Zurück zur Übersicht » REST - Task

REST - Task

REST-Interface

Get task by id

URL
GET <application-url>/api/task/<taskId>

Path parameter

Produces

application/json
application/xml

com.matterial.mtr.api.object.Task

Permission
Login

Sample
GET http://localhost:8080/mtr-backend/api/task/1


Get tasks

URL
GET <application-url>/api/task

Query parameter

Produces

application/json
application/xml

List<com.matterial.mtr.api.object.Task>

Permission
Login

Sample
GET http://localhost:8080/mtr-backend/api/task


Create task

Creating a task will automatically set (overwrite) these fields:

URL
POST <application-url>/api/task

Consumes

application/json
application/xml

com.matterial.mtr.api.object.Task

Produces

application/json
application/xml

com.matterial.mtr.api.object.Task

Permission
EDIT_TASK

Sample
POST http://localhost:8080/mtr-backend/api/task


Update task

You can only update these fields:

URL
PUT <application-url>/api/task/<taskId>

Path parameter

Consumes

application/json
application/xml

com.matterial.mtr.api.object.Task

Produces

application/json
application/xml

com.matterial.mtr.api.object.Task

Permission
EDIT_TASK

Sample
PUT http://localhost:8080/mtr-backend/api/task/2


Accept

Since v2.5.0

Accepts the task. This sets these values:

The task can only be accepted if:

URL
PUT <application-url>/api/task/<taskId>/accept

Path parameter

Produces

application/json
application/xml

com.matterial.mtr.api.object.Task

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/task/2/accept


Return

Since v2.5.0

Returns the task to group. This sets these values:

The task can only be returned if:

URL
PUT <application-url>/api/task/<taskId>/return

Path parameter

Produces

application/json
application/xml

com.matterial.mtr.api.object.Task

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/task/2/return


Close

Since v2.5.0

Closes the task. This sets these values:

The task can only be closed if:

URL
PUT <application-url>/api/task/<taskId>/close

Path parameter

Produces

application/json
application/xml

com.matterial.mtr.api.object.Task

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/task/2/close


Reject with message

Since v2.8.0

Rejects the task and adds an optional message. This sets these values:

The task can only be rejected if:

URL
PUT <application-url>/api/task/<taskId>/reject

Path parameter

Consumes

text/plain

String - the message

Produces

application/json
application/xml

com.matterial.mtr.api.object.Task

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/task/2/reject


Reject

Since v2.5.0

Rejects the task. This sets these values:

The task can only be rejected if:

URL
PUT <application-url>/api/task/<taskId>/reject

Path parameter

Produces

application/json
application/xml

com.matterial.mtr.api.object.Task

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/task/2/reject


Resubmit

Since v2.5.0

Resubmits the task. This sets these values:

The task can only be resubmitted if:

URL
PUT <application-url>/api/task/<taskId>/resubmit

Path parameter

Produces

application/json
application/xml

com.matterial.mtr.api.object.Task

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/task/2/resubmit


Reopen

Since v2.5.0

Reopens the task. This sets these values:

The task can only be reopened if:

URL
PUT <application-url>/api/task/<taskId>/reopen

Path parameter

Produces

application/json
application/xml

com.matterial.mtr.api.object.Task

Permission
Login

Sample
PUT http://localhost:8080/mtr-backend/api/task/2/reopen


Remove task

URL
DELETE <application-url>/api/task/<taskId>

Path parameter

Produces

text/plain

Integer - count of removed

Permission
EDIT_TASK

Sample
DELETE http://localhost:8080/mtr-backend/api/task/8