Substitution REST APIs
This section lists out details of all the REST APIs used to substitute an user. For more information about user substitution, see Working with BPMN User Substitution.
Add substitute
Request Type | POST | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Request URL | https://<Host Name>:<Port>/bpmn/runtime/substitutes Sample URL: https://localhost:9443/bpmn/runtime/substitutes | ||||||||||||||||||
Details & Parameters | This request will add new substitution record. If the existing substitution is disabled, it will be enabled after this update request.
| ||||||||||||||||||
Request Body | { "assignee":"assigneeUserName", "substitute" : "SubstituteUsername", "startTime" : "20160101T12:00:00Z", "endTime" : "20170101T12:00:00Z", “taskList” : [‘id1’, ‘id2’, ‘id3’] } | ||||||||||||||||||
Response |
|
Update substitution record
Request Type | PUT | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Request URL | https://<Host Name>:<Port>/bpmn/runtime/substitutes/{user} | |||||||||||||||
Details & Parameters | This request will update an existing substitution record of the user identified by the {user}. If any of the following parameters are not provided, the existing value will be retained.
| |||||||||||||||
Request Body | { "substitute" : "SubstituteUsername", "startTime" : "20160101T12:00:00Z", "endTime" : "20170101T12:00:00Z", “taskList” : [‘id1’, ‘id2’, ‘id3’] } | |||||||||||||||
Response |
|
Change substitute
Request Type | PUT | ||||||
---|---|---|---|---|---|---|---|
Request URL | https://<Host Name>:<Port>/bpmn/runtime/substitutes/{user}/substitute | ||||||
Details & Parameters | This request will change the existing substitute record of the user identified by {user}.
| ||||||
Request Body | { "substitute" : "username" } | ||||||
Response |
|
Get substitute information
Request Type | GET |
---|---|
Request URL | https://<Host Name>:<Port>/bpmn/runtime/substitutes/{user} |
Details & Parameters | This request will return the substitute record of the user identified by {user}. No request parameters. |
Response Body | { “assignee” : “user” "substitute" : "SubstituteUsername", "startTime" : "20160101T12:00:00Z", "endTime" : "20170101T12:00:00Z", “taskList” : [‘id1’, ‘id2’, ‘id3’] } |
Response |
|
Query substitutes
Request Type | GET | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Request URL | https://<Host Name>:<Port>/bpmn/runtime/substitutes | ||||||||||||||||||||
Details & Parameters | This request will return the query result of the substitution records based on substitute, assignee and enabled or disabled parameters and pagination parameters. The following parameters are allowed.
| ||||||||||||||||||||
Response Body | { "size":2, "order":"asc", "total":3, "sort":"startTime", "start":0, "substituteInfoList":[ { "substitute":"vinod", "startTime":1468261800000, "endTime":1468348200000, "enabled":true, "assignee":"admin" }, { "substitute":"vinod", "startTime":1468261800000, "endTime":1469730600000, "enabled":true, "assignee":"waruna" } ] } | ||||||||||||||||||||
Response |
|
Disable a substitution
Request Type | POST |
---|---|
Request URL | https://<Host Name>:<Port>/bpmn/runtime/substitutes/{user}/disable |
Details & Parameters | This request will disable/enable the substitution record of the user identified by {user}. |
Request Body | { “action” : true/false } |
Response |
|
Check if substitution feature is enabled
Request Type | GET |
---|---|
Request URL | https://<Host Name>:<Port>/bpmn/runtime/substitutes/configs/enabled |
Details & Parameters | This will return true if the substitution feature is enabled, else it will return as false. No request parameters. |
Response Body | { “enabled” : true/false } |
Response |
|