Task engine REST API V2
This topic lists the JSON formats for the task engine REST API V2.
JSON Formats
Task Response
{
"updated_iso" : "2014-03-31T13:05:14+0200",
"description_message" : "The process is complete.",
"domain" : "Default",
"created" : 1396263830875,
"error" : {
"resourceBundle" : "com.ibm.orchestrator.messages.orchestratormessages",
"message" : null,
"messageKey" : "BPM_PROCESS_COMPLETE",
"args" :
[
"3"
]
},
"user" : "ksadmin",
"parm" : {
.....
},
"created_iso" : "2014-03-31T13:03:50+0200",
"status_localized" : "Completed",
"error_message" : "CTJCO0002I: Business process instance 3 completed successfully.",
"status" : "COMPLETED",
"eventTopic" : "com/ibm/orchestrator/serviceinstance/plan/ibm_bpm_process",
"delayInSeconds" : 30,
"project" : "admin",
"id" : "1003",
"updated" : 1396263914896,
"description" : {
"resourceBundle" : "com.ibm.orchestrator.messages.orchestratormessages",
"message" : null,
"messageKey" : "PROCESS_COMPLETE",
"args" :
[
]
}
}
Task Response
[Task Response 1,....., Task Response n]
GET: Get all tasks
- URL method
- /orchestrator/v2/tasks
- Accepts
- */*
- Content-Type
- application/JSON
- Normal response Codes
- 200
- Error Response Codes
- 500 internal server error
- Request Parameters
- Expand: If set to serviceInstance the information service instance referred by the attribute serviceInstanceId gets returned in the Task Response in the parameter serviceInstance.
- Response
- Tasks Response
- Authorization
- No authorization is needed but the output is restricted to tasks from all users within the current project. Users with role admin can see all the tasks.
POST: Get all tasks
- URL method
- /orchestrator/v2/tasks
- Accepts
- */*
- Content-Type
- application/JSON
- Normal Response Codes
- 201 created
- Error Response Codes
- 401 unauthorized
- 500 internal server error
- Response
- Tasks Response
- Authorization
- Role: admin
GET: Get the task with a given ID
- URL method
- /orchestrator/v2/tasks/{id}
- Accepts
- */*
- Content-Type
- application/JSON
- Normal Response Codes
- 200
- Error Response Codes
- 404 not found
- 500 internal server error
- Response
- Task Response
- Authorization
- No authorization is needed but the output is restricted to role
PUT: Get the task with a given ID
- URL pattern
- /orchestrator/v2/tasks/{id}
- Accepts
- */*
- Content-Type
- application/JSON
- Normal Response Codes
- 200
- Error Response Codes
- 401 unauthorized
- 404 not found
- 500 internal server error
- Response
- Task Response
- Authorization
- Role: admin or in same project as task
DELETE: Delete the task with a given ID
- URL pattern
- /orchestrator/v2/tasks/{id}
- Accepts
- */*
- Content-Type
- application/JSON
- Normal response Codes
- 204
- Error Response Codes
- 401 unauthorized
- 404 not found
- 500 internal server error
- Response
- Task Response
- Authorization
- Role: admin