API – List of tasks for the user
- To get the list of tasks assigned to a user you need to send GET request to the following URI http://localhost:8080/api/rest.php/tasks?page=1&count=10&filter[data_filter]=new&action=my&uid={uid}
- The query string must contain {uid} ("External No.") of the user.
- The request must contain the headings Content-Type: application/json;charset=UTF-8 and Authorization: Bearer xxxxxx.
Request example:
curl 'http://localhost:8080/api/rest.php/tasks?page=1&count=10&filter[data_filter]=new&action=my&uid=123' -H 'Authorization: Bearer xxxxxx' -H 'Content-Type: application/json;charset=UTF-8'
Instead of a local address http://localhost:8080 you need to use the address of your server.
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
- counter object (information about the number of tasks grouped by statuses)counts
- In case of error (HTTP response code - 400) it returns JSON object with error information