Get the list of pools

To get the list of created pools (including archived pools), send a GET request to the /pools resource.

Request

GET /api/v1/pools ?
  [status=<pool status>]
& [project_id=<project ID>]
& [limit=<maximum number of results in the response>]
& [sort=<fields to sort by>]
& [id_gt=<pool ID>]
& [id_gte=<pool ID>]
& [id_lt=<pool ID>]
& [id_lte=<pool ID>]
& [created_gt=<date>]
& [created_gte=<date>]
& [created_lt=<date>]
& [created_lte=<date>]
& [last_started_gt=<date>]
& [last_started_gte=<date>]
& [last_started_lt=<date>]
& [last_started_lte=<date>]

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

Parameter

Description

Data type

Required

status

Status of the pool:

  • OPEN

  • CLOSED

  • LOCKED — No possible actions.

  • ARCHIVED

String

No

project_id

ID of the project to which the pool is attached.

String

No

limit

Limit on the number of results to return. By default — 20; maximum — 300.

Number

No

sort

Parameters for sorting in ascending order:

  • id — Pool ID.

  • created — Date in UTC when the pool was created.

  • last_started — Date when the pool was last started.

You can set multiple comma-separated parameters.

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

String

No

id_gt

Pools with an ID greater than the specified value.

String

No

id_gte

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

String

No

id_lt

Pools with an ID less than the specified value.

String

No

id_lte

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

String

No

created_gt

Pools 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

Pools 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

Pools 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

Pools 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

last_started_gt

Pools that were last opened after the specified date. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

last_started_gte

Pools that were last opened on or after the specified date. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

last_started_lt

Pools that were last opened before the specified date. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

last_started_lte

Pools that were last opened on or before the specified date. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

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

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

Response

Contains a list of pools and their properties in the items array:

{"items": [{properties of pool 1}, {properties of pool 2}, ... {properties of pool n}], "has_more": false}