Change task assignees
Replace the current assignees of a task with other users or workflow roles.
For security reasons, you need to perform a Login action before making any other public calls to the WorldServer API. The
sessionId in the response is your session token. Use this token in all the other calls that you make.
Also, make sure that you have the appropriate user type permissions to perform this API call. To view or update your permissions, in WorldServer, go to and then select your user type.
API call
<protocol>://<ws-host>:<ws-port>/ws-api/v1/tasks/changeAssignees?token=<sessionId>
Details
- POST method
- Content-Type in the header:
application/json - Mandatory parameters: the session token (as a query string parameter or as a key-value pair in the header), the IDs of the tasks, and one of assignedUserIds or assignedRolesIds (in the JSON body)
- Optional parameters (all in the JSON body): assignedUserIds (the IDs of the users to which you want to assign the task), assignedRoleIds (the IDs of the workflow roles to which you want to assign the tasks), and taskStepIds (the steps of the workflow where the change should take place)
Request body example
Response
Error messages
| Message | Status code |
|---|---|
| Task Id is not valid (If the ID of the task is not a valid number.) | 400 Bad Request |
| Cannot assign users that do not have the task's target locale available | 400 Bad Request |
| Cannot assign users that are not in the task's workflow | 400 Bad Request |
| Task step has invalid types | 400 Bad Request |
| Resource user is not valid (If the ID of a user is not a valid number.) | 400 Bad Request |
| Resource workflow role is not valid (If the ID of a workflow role is not a valid number.) | 400 Bad Request |
| Resource task step is not valid (If the ID of a task step is not a valid number.) | 400 Bad Request |
| Field assignedUserIds or assignedRoleIds not set (You must specify a value for at least one of the two fields.) | 400 Bad Request |
| No session token provided or invalid token | 401 Unauthorized |
| No rights to CHANGE_ASSIGNEES for resource type TASK | 403 Forbidden |
| Resource TASK (ID) not found | 404 Not Found |
| Resource USER not found | 404 Not Found |
| Resource WORKFLOW_ROLE not found | 404 Not Found |
| Resource TASK_STEP not found | 404 Not Found |