TaskResource

TaskResource REST endpoint to access and manipulate specific task data. Copyright 2013 WANdisco.

The following resources are part of this group:

/task/{taskId}

Mount Point: /task/{taskId}

GET

Returns the TaskDTO with the specified identity if it exists or a 404 not found exception if the element does not exist

Parameters

name description type default
taskId the identity of the task to return. path

Response Body

element: (custom)
media types: application/xml
application/json

a representation of a task with the specified identity.

DELETE

Delete the Task with the specified identity if it exists or a 404 not found exception if the element does not exist, or 409 if the Task cannot be deleted, owing to it being in the wrong state.
HTTP Response codes:
- OK 200 when request was successfully completed. TODO: change to ACCEPTED 202
- CONFLICT 409 when task being deleted is in the wrong state to be deleted (e.g. pending)
- NOT_FOUND 404 when there is no reference to task id on the server, TaskNotFoundException. TODO: change to GONE 410

Parameters

name description type default
taskId the identity of the task to delete. path

Response Body

element: (custom)
media types: */*
application/xml

a Response object with errors/reasons (if any).

/task/{taskId}/abort

Mount Point: /task/{taskId}/abort

PUT

Update the Task with the specified identity to be aborted if it exists or return a 404 not found if the task does not exist

Parameters

name description type default
taskId the identity of the task to be aborted. path

Response Body

element: (custom)
media types: */*
application/xml

a Response object with errors/reasons (if any).

/task/{taskId}/force

Mount Point: /task/{taskId}/force

DELETE

Forced delete the Task with the specified identity (if task is pending, abort the task and then delete anyway, different from normal delete, which does not delete pending task) if it exists or a 404 not found exception if the element does not exist.
HTTP Response codes:
- OK 200 when request was successfully completed. TODO: change to ACCEPTED 202
- NOT_FOUND 404 when there is no reference to task id on the server, TaskNotFoundException. TODO: change to GONE 410
- INTERNAL_SERVER_ERROR 500 very unlikely, happens when incorrect state exception is thrown internally

Parameters

name description type default
taskId the identity of the task to force delete. path

Response Body

element: (custom)
media types: */*
application/xml

a Response object with errors/reasons (if any).

/task/{taskId}/withchildren

Mount Point: /task/{taskId}/withchildren

GET

Returns the TaskDTO with the specified identity if it exists or a 404 not found exception if the element does not exist

Parameters

name description type default
taskId the identity of the task to return. path

Response Body

element: (custom)
media types: application/xml
application/json

a representation of a task with the specified identity.