Get the list of tasks
Gets the list of tasks in the pool.
Request
Production version
Sandbox
GET https://toloka.yandex.com/api/v1/tasks
Authorization: OAuth <OAuth token>
GET https://sandbox.toloka.yandex.com/api/v1/tasks
Authorization: OAuth <OAuth token>
Headers
Title | Overview |
---|---|
Authorization | A token for account authorization. Add OAuth as a prefix. |
Query parameters
Specified in the link after the question mark; separated by &
.
Parameter |
Overview |
pool_id |
string | required ID of the pool to get tasks from. |
sort |
string Parameters to sort by:
To learn how to configure sorting, see Sorting the list of objects. |
overlap |
integer Tasks with an overlap equal to the specified value. |
Standard query parameters |
limit, id_gt, id_gte, id_lt, id_lte, created_gt, created_gte, created_lt, created_lte, overlap_gt, overlap_gte overlap_lt, overlap_lte. |
Query example
You can set up the display of the list of tasks in parts (for example, 10 tasks at a time):
- Show the first 10 tasks, starting with the task with the lowest ID.
- Show the remaining tasks (10 at a time) in ascending order.
Show the first 10 tasks
Production version
Sandbox
GET https://toloka.yandex.com/api/v1/tasks?sort=id&limit=10
Authorization: OAuth <OAuth token>
GET https://sandbox.toloka.yandex.com/api/v1/tasks?sort=id&limit=10
Authorization: OAuth <OAuth token>
Show the remaining tasks sorted by ascending ID
Production version
Sandbox
GET https://toloka.yandex.com/api/v1/tasks?sort=id&limit=10&id_gt=<ID of the last task from the previous response>
Authorization: OAuth <OAuth token>
GET https://sandbox.toloka.yandex.com/api/v1/tasks?sort=id&limit=10&id_gt=<ID of the last task from the previous response>
Authorization: OAuth <OAuth token>
Response
Contains task data in the items
array.
{"items" : [{task 1}, {task 2}, ... {task n}], "has_more": true}