LMS Collaborator knowledge base

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

API – Assigning a task to a user

  • To assign a task to a user you need to send POST request to the following URI https://your-domain.davintoo.com/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 'https://your-domain.davintoo.com/api/v2/tasks/36404/assign-user-multi' -H 'Authorization: Bearer xxxxxx' -H 'Content-Type: application/json;charset=UTF-8' --data-raw '{"users":[{"id":5694}, {"id":5430}],"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