Aggregate responses in a pool

To start the response aggregation for all completed tasks in the pool, send a POST request to the /api/v1/aggregated-solutions/aggregate-by-pool.

Request

POST /api/v1/aggregated-solutions/aggregate-by-pool
Host: https://sandbox.toloka.yandex.com
Authorization: OAuth <OAuth token>
Content-Type: application/JSON
{
  "pool_id": "283",
  "type": "WEIGHTED_DYNAMIC_OVERLAP", 
  "answer_weight_skill_id": "1289",
  "fields": [
    {
      "name": "result"
    }
  ]
}
Copied to clipboard
Key descriptions
Key Value Data type Required
pool_id Pool ID. String Yes
type Aggregation type.
  • WEIGHTED_DYNAMIC_OVERLAP — Aggregation of responses in a pool with dynamic overlap (also known as incremental relabeling or IRL) based on the performer's skill.
  • DAWID_SKENE — Aggregation of responses in a pool without dynamic overlap. The answer_weight_skill_id key for this aggregation type is ignored.
String Yes
answer_weight_skill_id A skill that determines the weight of the performer's response. String Yes, if the WEIGHTED_DYNAMIC_OVERLAP aggregation type is selected.
fields

Output data fields to use for aggregating responses. For best results, each of these fields must have a limited number of response options.

If the DAWID_SKENE aggregation type is selected, you can only specify one value.

JSON Yes
fields.name The output data field name. String Yes
Key Value Data type Required
pool_id Pool ID. String Yes
type Aggregation type.
  • WEIGHTED_DYNAMIC_OVERLAP — Aggregation of responses in a pool with dynamic overlap (also known as incremental relabeling or IRL) based on the performer's skill.
  • DAWID_SKENE — Aggregation of responses in a pool without dynamic overlap. The answer_weight_skill_id key for this aggregation type is ignored.
String Yes
answer_weight_skill_id A skill that determines the weight of the performer's response. String Yes, if the WEIGHTED_DYNAMIC_OVERLAP aggregation type is selected.
fields

Output data fields to use for aggregating responses. For best results, each of these fields must have a limited number of response options.

If the DAWID_SKENE aggregation type is selected, you can only specify one value.

JSON Yes
fields.name The output data field name. String Yes

Response

Contains operation details: Check the operation status. When it is completed get the aggregation results.

{
  "id": "fadfe3jk-fdafue2-fda32890-fdafdi23",
  "type": "SOLUTION.AGGREGATE",
  "status": "PEDNDING",
  "submitted": "2018-22-10T14:18:35",
  "progress" : 0,
  "parameters": {
    "pool_id": "283"
  }
}
Key descriptions
Key Value Data type Required

id

Operation ID.

String

Yes

type

Operation type:

  • POOL.OPEN — Opening a pool.

  • POOL.CLOSE — Closing a pool.

  • PROJECT.ARCHIVE — Archiving a project.

  • POOL.ARCHIVE — Archiving a pool.

  • SOLUTION.AGGREGATE — Aggregating responses.
  • TASK_SUITE.BATCH_CREATE — Creating multiple task suites.

String

Yes

status

The status of the operation:

  • PENDING — Not started yet.

  • RUNNING — In progress.

  • SUCCESS — Completed successfully.

  • FAIL — Not completed.

String

Yes

submitted

The UTC date and time the request was sent, in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

Yes

progress

The percentage of the operation completed.

Number

No

parameters

Operation parameters (depending on the operation type).

JSON

No

Key Value Data type Required

id

Operation ID.

String

Yes

type

Operation type:

  • POOL.OPEN — Opening a pool.

  • POOL.CLOSE — Closing a pool.

  • PROJECT.ARCHIVE — Archiving a project.

  • POOL.ARCHIVE — Archiving a pool.

  • SOLUTION.AGGREGATE — Aggregating responses.
  • TASK_SUITE.BATCH_CREATE — Creating multiple task suites.

String

Yes

status

The status of the operation:

  • PENDING — Not started yet.

  • RUNNING — In progress.

  • SUCCESS — Completed successfully.

  • FAIL — Not completed.

String

Yes

submitted

The UTC date and time the request was sent, in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].

String

Yes

progress

The percentage of the operation completed.

Number

No

parameters

Operation parameters (depending on the operation type).

JSON

No