Get a list of training pools

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

Request

GET /api/v1/trainings ?
  [status=<training pool status>]
& [project_id=<project ID>]
& [limit=<maximum number of results in the response>]
& [sort=<sort fields>]
& [id_gt=<training ID>]
& [id_gte=<training ID>]
& [id_lt=<training ID>]
& [id_lte=<training 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.com
Authorization: OAuth <OAuth token>
Request parameters
Parameter Overview Data type Required
status
Training pool status:
  • OPEN
  • CLOSED
  • LOCKED — No possible actions.
  • ARCHIVED
String No
project_id
ID of the project that the training pool is linked to. 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 — ID of the training pool.
  • created — Date in UTC when the training pool was created.
  • last_started — Date when the training 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
Training pools with an ID greater than the specified value. String No
id_gte
Training pools with an ID greater than or equal to the specified value. String No
id_lt
Training pools with an ID less than the specified value. String No
id_lte
Training pools with an ID less than or equal to the specified value. String No
created_gt
Training 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
Training 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
Training 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
Training 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
Training 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
Training 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
Training 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
Training 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
Parameter Overview Data type Required
status
Training pool status:
  • OPEN
  • CLOSED
  • LOCKED — No possible actions.
  • ARCHIVED
String No
project_id
ID of the project that the training pool is linked to. 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 — ID of the training pool.
  • created — Date in UTC when the training pool was created.
  • last_started — Date when the training 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
Training pools with an ID greater than the specified value. String No
id_gte
Training pools with an ID greater than or equal to the specified value. String No
id_lt
Training pools with an ID less than the specified value. String No
id_lte
Training pools with an ID less than or equal to the specified value. String No
created_gt
Training 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
Training 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
Training 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
Training 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
Training 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
Training 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
Training 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
Training 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 trainings in parts (for example, 10 pools at a time), use a combination of parameters in requests:

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

Response

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

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