Get responses

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

Gets responses for all the pool's task suites.

Request

GET https://toloka.yandex.com/api/v1/assignments
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

Status of an assigned task suite. If you need to list multiple statuses, separate them with commas:

  • ACTIVE — Being completed by a user.

  • SUBMITTED — Completed but not checked.

  • ACCEPTED — Accepted by the requester.

  • REJECTED — Rejected by the requester.

  • SKIPPED — Skipped by the user.

  • EXPIRED — The time for completing the tasks expired.

task_id

string

You must specify either task_id,pool_id, or task_suite_id.

The task ID in the suites that were generated automatically using “smart mixing”. You will get responses for task suites that contain the specified task.

task_suite_id

string

You must specify either task_id,pool_id, or task_suite_id.

ID of a task suite.

pool_id

string

You must specify either task_id,pool_id, or task_suite_id.

Pool ID.

user_id

string

User ID.

sort

string

Parameters for sorting in ascending order:

  • id — ID of the task suite assignment.

  • created — The date the task suite was assigned.

  • submitted — The date the task suite was completed.

  • skipped — The date the task suite was skipped.

  • expired — The date the task suite expired.

  • accepted — The date the task suite was accepted by the requester.

  • rejected — The date the task suite was rejected by the requester.

Note. All dates use the ISO 8601 format YYYY-MM-DDThh:mm:ss[.sss].

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

This query supports multiple sorts that must be specified in a desired sequence:

  • created,id — Sort ascending first by the date the task suite was assigned to the user, then by the ID of the task suite assignment.
  • -created,-id — Sort descending first by the date the task suite was assigned, then by the ID of the task suite assignment.
  • accepted,id — Sort ascending first by the date the task suite was accepted by the requester, then by the ID of the task suite assignment.
  • -accepted,-id — Sort descending first by the date the task suite was accepted by the requester, then by the ID of the task suite assignment.
Standard query parameters
Parameter Overview
status

string

Status of an assigned task suite. If you need to list multiple statuses, separate them with commas:

  • ACTIVE — Being completed by a user.

  • SUBMITTED — Completed but not checked.

  • ACCEPTED — Accepted by the requester.

  • REJECTED — Rejected by the requester.

  • SKIPPED — Skipped by the user.

  • EXPIRED — The time for completing the tasks expired.

task_id

string

You must specify either task_id,pool_id, or task_suite_id.

The task ID in the suites that were generated automatically using “smart mixing”. You will get responses for task suites that contain the specified task.

task_suite_id

string

You must specify either task_id,pool_id, or task_suite_id.

ID of a task suite.

pool_id

string

You must specify either task_id,pool_id, or task_suite_id.

Pool ID.

user_id

string

User ID.

sort

string

Parameters for sorting in ascending order:

  • id — ID of the task suite assignment.

  • created — The date the task suite was assigned.

  • submitted — The date the task suite was completed.

  • skipped — The date the task suite was skipped.

  • expired — The date the task suite expired.

  • accepted — The date the task suite was accepted by the requester.

  • rejected — The date the task suite was rejected by the requester.

Note. All dates use the ISO 8601 format YYYY-MM-DDThh:mm:ss[.sss].

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

This query supports multiple sorts that must be specified in a desired sequence:

  • created,id — Sort ascending first by the date the task suite was assigned to the user, then by the ID of the task suite assignment.
  • -created,-id — Sort descending first by the date the task suite was assigned, then by the ID of the task suite assignment.
  • accepted,id — Sort ascending first by the date the task suite was accepted by the requester, then by the ID of the task suite assignment.
  • -accepted,-id — Sort descending first by the date the task suite was accepted by the requester, then by the ID of the task suite assignment.
Standard query parameters

Query example

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

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

Response

Information about responses in the items array:

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