REST - Task

REST-Interface

Get task by id

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

Path parameter

parameter mandatory possible values default description
taskId yes - - task-id

Produces

application/json
application/xml

com.matterial.mtr.api.object.Task

  • 200 OK
  • 400 BAD_REQUEST
  • 404 NOT_FOUND
  • 500 INTERNAL_SERVER_ERROR

Permission Login

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


Get tasks

URL GET <application-url>/api/task

Query parameter

  • documentId task related to this document
  • documentLanguageVersionId task related to this version
  • languageKey task realted to this document-language
  • authorAccountId task was created by this account
  • accountId task was accepted by this account
  • roleId task was assigned to this role
  • assignedOnly possible: true, false default: false if true, get only tasks assigned to one of my roles
  • showSnapOnly possible: true, false default: false if true, get only snap-tasks
  • hideSnap possible: true, false default: false if true, hide snap-tasks
  • hideTasksOfRemovedDocuments possible: true, false default: false if true, hide tasks of removed documents
  • statusId multiple: true possible: statusId(s) as number Id(s) of a TaskStatus
  • statusIdExclude multiple: true possible: statusId(s) as number Id(s) of a TaskStatus to exclude
  • orderBy possible: id date dueDate status documentId documentName default: date the order by
  • orderDir possible: asc, desc default: desc the ordering direction
  • count possible: true, false default: false fetch totalHits (overallCount)
  • offset
  • limit

Produces

application/json
application/xml

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

  • 200 OK
  • 500 INTERNAL_SERVER_ERROR

Permission Login

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


Create task

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

  • 201 CREATED
  • 400 BAD_REQUEST
  • 500 INTERNAL_SERVER_ERROR

Permission EDIT_TASK

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


Update task

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

Path parameter

  • taskId The id of a specific task

Consumes

application/json
application/xml

com.matterial.mtr.api.object.Task

Produces

application/json
application/xml

com.matterial.mtr.api.object.Task

  • 201 CREATED
  • 400 BAD_REQUEST
  • 500 INTERNAL_SERVER_ERROR

Permission EDIT_TASK

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


Remove task

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

Path parameter

  • taskId The id of a specific task

Produces

text/plain

Integer - count of removed

  • 200 OK
  • 400 BAD_REQUEST
  • 500 INTERNAL_SERVER_ERROR

Permission EDIT_TASK

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

×
Peter's Problem.