Get the list of tasks

To get the list of tasks in a pool, send a GET request to the /tasks resource.

Request

Get api/v1 / tasks ?
    pool_id=<pool ID>
&   [limit=<maximum number of results in the response>]
&   [sort=<fields to sort by>]
&   [id_gt=<task ID>]
&   [id_gte=<task ID>]
&   [id_lt=<task ID>]
&   [id_lte=<task ID>]
&   [created_gt=<date>]
&   [created_gte=<date>]
&   [created_lt=<date>]
&   [created_lte=<date>]
&   [overlap=<overlap>]
&   [overlap_gt=<overlap>]
&   [overlap_gte=<overlap>]
&   [overlap_lt=<overlap>]
&   [overlap_lte=<overlap>]

Host: https://sandbox.toloka.yandex.ru
Authorization: OAuth <OAuth token>
Request parameters

Parameter

Description

Data type

Required

pool_id

ID of the pool to get tasks from.

String

Yes

limit

Limit on the number of results to return. By default — 50; maximum — 100000.

Number

No

sort

Parameters for sorting in ascending order:

  • id — Task ID.

  • created — Date the task was created, in UTC in the format YYYY-MM-DD.

You can separate parameters with a comma.

To change the sorting direction to descending, add the minus sign before the parameter. For example, sort=-id.

String

No

id_gt

Tasks with an ID greater than the specified value.

String

No

id_gte

Tasks with an ID greater than or equal to the specified value.

String

No

id_lt

Tasks with an ID less than the specified value.

String

No

id_lte

Tasks with an ID less than or equal to the specified value.

String

No

created_gt

Tasks created after the specified date. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

created_gte

Tasks created after or on the specified date. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

created_lt

Tasks created before the specified date. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

created_lte

Tasks created before or on the specified date. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

overlap Tasks with an overlap equal to the specified value. Number No
overlap_gt

Tasks with an overlap greater than the specified value.

Number

No

overlap_gte

Tasks with an overlap equal to the specified value.

Number

No

overlap_lt

Tasks with an overlap less than the specified value.

Number

No

overlap_lte

Tasks with an overlap equal to the specified value.

Number

No

To get the list of tasks in parts (for example, 10 tasks at a time), use a combination of parameters in requests:

GET /api/v1/tasks?sort=id&limit=10
Host: https://sandbox.toloka.yandex.ru
Authorization: OAuth <OAuth token>
GET /api/v1/tasks?sort=id&limit=10&id_gt=<ID of the last task from the previous response>
Host: https://sandbox.toloka.yandex.ru
Authorization: OAuth <OAuth token>

Response

Contains task data in the items array.

{"items" : [{task 1}, {task 2}, ... {task n}], "has_more": true}