Get a list of training pools

  1. Request
  2. Headers
  3. Query parameters
  4. Query example
  5. Response

Gets the list of created training pools (including archived pools).

Request

GET https://toloka.yandex.com/api/v1/trainings
Authorization: OAuth <OAuth token>

Headers

Title Overview
authorization A token for account authorization. Add OAuth as a prefix.
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
status

string

Training pool status:
  • OPEN — Open.
  • CLOSED — Closed.
  • LOCKED — No possible actions.
  • ARCHIVED — Archived.
project_id

string

ID of the project that the training pool is linked to.
sort

string

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.

Standard query parameters limit, id_gt, id_gte, id_lt, id_lte, created_gt, created_gte, created_lt, created_lte last_started_gt, last_started_gte, last_started_lt, last_started_lte
Parameter Overview
status

string

Training pool status:
  • OPEN — Open.
  • CLOSED — Closed.
  • LOCKED — No possible actions.
  • ARCHIVED — Archived.
project_id

string

ID of the project that the training pool is linked to.
sort

string

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.

Standard query parameters limit, id_gt, id_gte, id_lt, id_lte, created_gt, created_gte, created_lt, created_lte last_started_gt, last_started_gte, last_started_lt, last_started_lte

Query example

You can set up the display of the list of pools in parts (for example, 10 pools at a time):

  1. Show the first 10 pools, starting with the pool with the lowest ID.
  2. Show the remaining pools (10 at a time) in ascending order.
Show the first 10 pools
GET https://toloka.yandex.com/api/v1/trainings?sort=id&limit=10
Authorization: OAuth <OAuth token>
Show the remaining responses sorted by ascending ID
GET https://toloka.yandex.com/api/v1/trainings?sort=id&limit=10&id_gt=<id of the last training from the previous response>
Authorization: OAuth <OAuth token>

Response

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

{"items" : [{parameters_of_training_pool_1}, {parameters_of_training_pool_2}, ... {parameters_of_training_pool_n}], "has_more": false}