Open or close a pool

To make tasks available to users, you need to open the pool. Send a POST request to the /pools/<pool ID>/open resource. To close a pool and stop assigning tasks, send a POST request to the /pools/<pool ID>/close resource. As a result of requests, an operation is created. To track the progress of the operation, send a request to the /operations resource.

Request

Opening a pool:

POST /api/v1/pools/<pool ID>/open
Host: https://sandbox.toloka.yandex.ru
Authorization: OAuth <OAuth token>

Closing a pool:

POST /api/v1/pools/<pool ID>/close
Host: https://sandbox.toloka.yandex.ru
Authorization: OAuth <OAuth token>

Response

Contains information about the operation:

{
  "id": "fadfe3jk-fdafue2-fda32890-fdafdi23",
  "type": "POOL.OPEN",
  "status": "PENDING",
  "submitted": "2015-22-12T14:18:35",
  "started" : "2016-04-07T16:06:15.902",
  "finished" : "2016-04-07T16:06:15.902",
  "progress" : 100,
  "parameters": {
    "pool_id": "21"
  }
}
Key descriptions
Key Value Data type
id Operation ID. String
type

Operation type:

  • POOL.OPEN — Opening a pool.
  • POOL.CLOSE — Closing a pool.
  • PROJECT.ARCHIVE — Archiving a project.
  • POOL.ARCHIVE — Archiving a pool.
  • POOL.CLONE — Cloning a pool.
  • TASK.BATCH_CREATE — Creating multiple tasks.
  • TASK_SUITE.BATCH_CREATE — Creating multiple task suites.
  • USER_BONUS.BATCH_CREATE — Awarding a bonus to multiple users.
String
status

The status of the operation:

  • PENDING — Not started yet.
  • RUNNING — In progress.
  • SUCCESS — Completed sucessfully.
  • FAIL — Not completed.
String
submitted The UTC date and time the request was sent, in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss]. String
started The UTC date and time the operation started, in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss]. String
finished The UTC date and time the operation was completed, in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss]. String
progress The percentage of the operation completed. Number
parameters.id Pool ID. String
Key Value Data type
id Operation ID. String
type

Operation type:

  • POOL.OPEN — Opening a pool.
  • POOL.CLOSE — Closing a pool.
  • PROJECT.ARCHIVE — Archiving a project.
  • POOL.ARCHIVE — Archiving a pool.
  • POOL.CLONE — Cloning a pool.
  • TASK.BATCH_CREATE — Creating multiple tasks.
  • TASK_SUITE.BATCH_CREATE — Creating multiple task suites.
  • USER_BONUS.BATCH_CREATE — Awarding a bonus to multiple users.
String
status

The status of the operation:

  • PENDING — Not started yet.
  • RUNNING — In progress.
  • SUCCESS — Completed sucessfully.
  • FAIL — Not completed.
String
submitted The UTC date and time the request was sent, in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss]. String
started The UTC date and time the operation started, in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss]. String
finished The UTC date and time the operation was completed, in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss]. String
progress The percentage of the operation completed. Number
parameters.id Pool ID. String