Create a project for moving tasks
Create an empty project, in which you will be able to move one or more tasks. The project will use the settings of an existing task of your choice.
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.
Prerequisites
- The ID of a task that you want to move, so that the project can have the same language pair. To retrieve a list of list of all the available tasks, make a GET call to the following endpoint and write down the appropriate task ID in the response:
<protocol>://<ws-host>:<ws-port>/ws-api/v2/tasks?token=<sessionId>
- The ID of the workgroup to which you want to assign the new project. To retrieve a list of all the available workgroups, make a GET call to the following endpoint and write down the appropriate workgroup ID in the response:
<protocol>://<ws-host>:<ws-port>/ws-api/v2/workgroups?token=<sessionId>
API call
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) and the JSON body with the details of the project
Request body example
idis the ID of the task that you want to move to the project.nameis the name of the empty project that you want to create.descriptionis a short description of the project that you want to create.workgroupIdis the ID of the workgroup assigned to work on the new project.
Response
The value of the response property is the ID of the newly created project.
What to do next
Write down the ID of the newly created project and move the appropriate tasks to that project.
Error messages
| Message | Status code |
|---|---|
| Invalid JSON | 400 Bad Request |
| Field name not set | 400 Bad Request |
| Field id not set | 400 Bad Request |
| Field workgroupId not set | 400 Bad Request |
| No session token provided | 401 Unauthorized |
| Resource TASK (ID) not found | 404 Not Found |
| Resource WORKGROUP (ID) not found | 404 Not Found |
Troubleshooting
- Make sure that the endpoint you are calling is correct.
- Make sure that you are using the POST method for the call.
- Make sure that the Content-Type in the header is
application/json. - Make sure that your session token is correct and that it has not expired.
- Make sure that you included all the required information (
id,name,description,workgroupId) in the JSON body.