API – List of tasks assigned to the user
- To get the list of tasks assigned to a user you need to send GET request to the following URI /api/v2/tasks/report/get-user-tasks-report?filter[id]={uid}
- The query string must contain {uid} of the user.
- The request 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/report/get-user-tasks-report?filter[id]=5694' -H 'Authorization: Bearer xxxxxx' -H 'Content-Type: application/json;charset=UTF-8'
The request supports filtering by the following fields:
- Name of the tasktitle
- Task type (training-program, course, resource, workshops, meetup, test, complex-test, polls, poll360, check-list, webinar)type
- Date of assignmentdate_assign
- Actual execution datedate_finish
- Current task status (not_started, inprogress, started, verification, fail, finished)status
An example of a query with a filter by status of task:
curl 'https://your-domain.davintoo.com/api/v2/tasks/report/get-user-tasks-report?filter[id]=5694&filter[status]=not_started' -H 'Authorization: Bearer xxxxxx' -H 'Content-Type: application/json;charset=UTF-8'
Answer
-
In case of successful request (HTTP response code - 200), the following result will be returned:
- user task arraydata
- pagination object (information about the number of pages, the current page, the number of tasks)pager
-
In case of error (HTTP response code - 400) it returns JSON object with error information