LMS Collaborator knowledge base

Home/Technical requirements/API/API - Assigning a task to a user

API – Assigning a task to a user

See API – Authorization

  • To assign a task to a user you need to send POST request to the following URI http://localhost:8080/api/v2/tasks/{taskId}/assign-user-multi
  • The query string must contain {taskId} Id of the task.
  • The body of the query must contain a JSON object with the fields:
    users:[{"id":}] - Id of the user
    type- assign
  • The query must contain the headings Content-Type: application/json;charset=UTF-8 and Authorization: Bearer xxxxxx.

Request example:
curl 'http://localhost:8080/api/v2/tasks/123456/assign-user-multi' -H 'Authorization: Bearer xxxxxx' -H 'Content-Type: application/json;charset=UTF-8' --data-raw '{"users":[{"id":123456}],"type":"assign"}'


Answer

  • In case of successful request (HTTP response code - 200), the result will be returned like this:
    data - empty array
    users_of_task - total number of users assigned to the task
  • In case of error (HTTP response code - 400) it returns JSON object with error information
Still have questions?
Our technical support team is always happy to help!
Write to us at technical support [email protected]. If you are registered on our Helpdesk - send request button below.
Send request