Get 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=<sort fields>]
& [id_gt=<ID of the task suite assignment>]
& [id_gte=<ID of the task suite assignment>]
& [id_lt=<ID of the task suite assignment>]
& [id_lte=<ID of the task suite assignment>]
& [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.com
Authorization: OAuth <OAuth token>
Request parameters

Parameter

Overview

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 the suites that were 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 — ID of the task suite assignment (ascending order).

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

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

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

Suites with an assignment ID greater than the specified value.

String

No

id_gte

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

String

No

id_lt

Suites with an assignment ID less than the specified value.

String

No

id_lte

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

String

No

created_gt

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

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

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

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

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

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

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

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

Parameter

Overview

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 the suites that were 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 — ID of the task suite assignment (ascending order).

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

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

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

Suites with an assignment ID greater than the specified value.

String

No

id_gte

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

String

No

id_lt

Suites with an assignment ID less than the specified value.

String

No

id_lte

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

String

No

created_gt

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

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

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

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

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

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

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

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.com
Authorization: OAuth <OAuth token>
GET /api/v1/assignments?sort=id&limit=10&id_gt=<ID of the last task suite from the previous response>
Host: https://sandbox.toloka.yandex.com
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",
    "bonus_ids": "['10']",
    "public_comment": "Well done!",
    "owner": {
      "id": "ac1e4701364b4ccef8a4fe10a8980cff",
      "myself": true
    }
  }],
  "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>": <response>,
        "<field 2>": <response>
...
        "<field N>": <response>
      },
...
    }

Array

No

solutions

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

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 Requester's guide.

Boolean

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.

Boolean

Yes

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 a 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 task suite expired. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

public_comment

A comment for the user.

Maximum length: 2048 characters.

String

No

bonus_ids

IDs of rewards issued.

Array

No

owner.id Requester ID. String Yes
owner.myself Checks who the object belongs to:
  • true — The user who made the request.
  • false — Another account (employee or owner).
Boolean Yes
owner.company_id Company ID. String No

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>": <response>,
        "<field 2>": <response>
...
        "<field N>": <response>
      },
...
    }

Array

No

solutions

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

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 Requester's guide.

Boolean

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.

Boolean

Yes

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 a 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 task suite expired. The date is specified in UTC in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

No

public_comment

A comment for the user.

Maximum length: 2048 characters.

String

No

bonus_ids

IDs of rewards issued.

Array

No

owner.id Requester ID. String Yes
owner.myself Checks who the object belongs to:
  • true — The user who made the request.
  • false — Another account (employee or owner).
Boolean Yes
owner.company_id Company ID. String No