Responses

To get responses for all the pool's task suites, responses for a specific time period, and so on, set parameters in a GET request to the /assignments resource.

Request

GET /api/v1/assignments ?
  [status=<status of an assigned task suite>]
& [task_id=<task ID>]
& [task_suite_id=<task suite ID>]
& [pool_id=<pool ID>]
& [user_id=<user ID>]
& [limit=<maximum number of results in the response>]
& [sort=<fields to sort by>]
& [id_gt=<assignment ID>]
& [id_gte=<assignment ID>]
& [id_lt=<assignment ID>]
& [id_lte=<assignment ID>]
& [created_gt=<date>]
& [created_gte=<date>]
& [created_lt=<date>]
& [created_lte=<date>]
& [submitted_gt=<date>]
& [submitted_gte=<date>]
& [submitted_lt=<date>]
& [submitted_lte=<date>]

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

Parameter

Description

Data type

Required

status

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.

String

No

task_id

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

String

You must specify either task_id,pool_id, or task_suite_id

task_suite_id

ID of a task suite.

String

You must specify either task_id,pool_id, or task_suite_id

pool_id

Pool ID.

String

You must specify either task_id,pool_id, or task_suite_id

user_id

User ID.

String

No

limit

Limit on the number of results to return. By default — “50”; maximum — “10000”.

Number

No

sort

Parameters to sort by:

  • id — The ID of the task suite output (ascending).

  • created — The date the task suite was assigned, in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss] (ascending).

  • submitted — The date the task suite was completed, in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss] (ascending).

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

Task suites with an assignment ID greater than the specified value.

String

No

id_gte

Task suites with an assignment ID greater than or equal to the specified value.

String

No

id_lt

Task suites with an assignment ID less than the specified value.

String

No

id_lte

Task suites with an assignment ID less than or equal to the specified value.

String

No

created_gt

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

String

No

created_gte

Task suites assigned 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

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

String

No

created_lte

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

String

No

submitted_gt

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

String

No

submitted_gte

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

String

No

submitted_lt

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

String

No

submitted_lte

Task suites completed before or on 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 responses in parts (for example, 10 task suites at a time), use a combination of parameters in requests:

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

Response

Contains information about an assigned task suite and the results:

{
  "items": [
    {
      "id": "566ec2b0ff0deeaae5f9d4fe",
      "task_suite_id": "566ec2b0ff0deeaae5f9d4ff",
      "pool_id": "21",
      "user_id": "566ec2b0ff0deeaae5f9d500",
      "status": "ACCEPTED",
      "reward": 0.1,
      "tasks": [
        {"id": "57a333ea-2827-4c1c-ab1f-8ab1bfe4ee7e",
         "origin_task_id": "e3da7fe1-828d-4d9c-b49d-42c0eb5fcfde",
         "input_values": {
            "image": "http://images.com/1.png"
          }
        }
      ],
      "first_declined_solution_attempt": [
        {
          "output_values": {
            "colour": "black",
            }
        },
        ...
        ],
      "solutions": [
        {
          "output_values": {
            "colour": "white",
            }
        },
       ...
     ],
     "mixed": true,
     "automerged": false,
     "created": "2015-12-15T14:52:00",
     "submitted": "2015-12-15T15:10:00",
     "accepted": "2015-12-15T20:00:00",
   }
 ],
"has_more": true
    }
Key descriptions

Key

Value

Data type

Required
id

ID of the task suite assignment to a user.

String

Yes
task_suite_id

ID of a task suite.

String

Yes
pool_id

ID of the pool that the task suite belongs to.

String

Yes
user_id

ID of the user who was assigned the task suite.

String

Yes
status

Status of an assigned task suite:

  • 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.

String

Yes
reward
Payment received by the performer. Number Yes
tasks

Data for the tasks.

Array

Yes
first_declined_solution_attempt

For training tasks. The user's first responses in the training task (only if these were the wrong answers). If the user answered correctly on the first try, the first_declined_solution_attempt array is omitted.

Arrays with the responses (output_values) are arranged in the same order as the task data in the tasks array.
{
      "output_values": {  
        "<field 1>": <answer>,
        "<field 2>": <answer>
...
        "<field n>": <answer>
      },
...
    }

Array

No
solutions
User responses. Arranged in the same order as the data for tasks in the tasks array.
{
      "output_values": {  
        "<field 1>": <answer>,
        "<field 2>": <answer>
...
        "<field n>": <answer>
      },
...
    }

Array

No
mixed

Type of operation for creating a task suite:

  • true — Automatic (“smart mixing”).

  • false— Manually.

The default value is false.

For more information about creating task suites, see the Toloka requester's guide.

String

No
automerged
Flag of the response received as a result of merging identical tasks . Value:
  • true — The response was recorded when identical tasks were merged.
  • false — Normal user response.
created
The date and time when the task suite was assigned to a user. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

Yes
submitted

The date and time when the task suite was completed by a user. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No
accepted

The date and time when the responses for the task suite were accepted by the requester. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No
rejected

The date and time when the responses for the task suite were rejected by the requester. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No
skipped

The date and time when the task suite was skipped by the user. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No
expired

The date and time when the time for completing the task suite expired. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No