LMS Collaborator knowledge base

Home/Technical requirements/API/API - List of tasks assigned to the user

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:
title - Name of the task
type - Task type (training-program, course, resource, workshops, meetup, test, complex-test, polls, poll360, check-list, webinar)
date_assign - Date of assignment
date_finish - Actual execution date
status - Current task status (not_started, inprogress, started, verification, fail, finished)

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:
    data - user task array
    pager - pagination object (information about the number of pages, the current page, the number of tasks)

  • 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