Create multiple task suites

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

Creates multiple task suites.

Restriction. You can add a maximum of 100,000 tasks per minute and a maximum of 2,000,000 tasks per day.

You can add a maximum of 100,000 tasks per minute and a maximum of 2,000,000 tasks per day.

Request

POST https://toloka.yandex.com/api/v1/task-suites
Authorization: OAuth <OAuth token>
Content-Type: application/JSON

[{task suite 1}, {task suite 2},... {task suite N}]

Headers

Title Overview
authorization A token for account authorization. Add OAuth as a prefix.
content-type Specifies the data format in the request body.
Title Overview
authorization A token for account authorization. Add OAuth as a prefix.
content-type Specifies the data format in the request body.

Query parameters

Specified in the link after the question mark; separated by &.

Parameter Overview
async_mode

boolean

Mode for request processing:

  • true — Asynchronous. Creates an asynchronous operation that runs in the background. The response contains information about the operation (start and completion time, status, number of task suites).

  • false — Synchronous. The response contains information about the created task suites. Maximum of 5000 task suites per request.

The default value is false.

skip_invalid_items

boolean

Overlap settings:

The default value is false.

allow-defaults

boolean

Overlap settings:

The default value is false.

open_pool

boolean

Open the pool immediately after creating the task suite, if the pool is closed. The default value is false.

operation_id

string

Operation ID for asynchronously loading task suites (if async_mode=true).

We recommend sending the ID in the POST request to avoid accidental errors, such as creating the operation multiple times for the same task suites.

The ID should conform to the RFC4122 standard.

You can use this ID in the future to get information about the operation.

Parameter Overview
async_mode

boolean

Mode for request processing:

  • true — Asynchronous. Creates an asynchronous operation that runs in the background. The response contains information about the operation (start and completion time, status, number of task suites).

  • false — Synchronous. The response contains information about the created task suites. Maximum of 5000 task suites per request.

The default value is false.

skip_invalid_items

boolean

Overlap settings:

The default value is false.

allow-defaults

boolean

Overlap settings:

The default value is false.

open_pool

boolean

Open the pool immediately after creating the task suite, if the pool is closed. The default value is false.

operation_id

string

Operation ID for asynchronously loading task suites (if async_mode=true).

We recommend sending the ID in the POST request to avoid accidental errors, such as creating the operation multiple times for the same task suites.

The ID should conform to the RFC4122 standard.

You can use this ID in the future to get information about the operation.

Response

The response format depends on the value of async_mode.

{
  "items": {
    "0": {<task suite>},
    "2": {<task suite>}, ...
    "<n>": {<task suite N>}
     },
  "validation_errors": {
    "1": {<validation errors for the task suite>},
    "3": {<validation errors for the task suite>}, ...
    "<n>": {<validation errors for task suite N>}
     }
}
Parameter Overview

items

object

An object with the created task suites.

validation_errors

object

An object with the errors in task suites. Returned if the request has the parameter skip_invalid_items=true.

<n>

object

Sequential number of the task suite in the array when created (starting from 0).

Parameter Overview

items

object

An object with the created task suites.

validation_errors

object

An object with the errors in task suites. Returned if the request has the parameter skip_invalid_items=true.

<n>

object

Sequential number of the task suite in the array when created (starting from 0).