Close a training

Attention

The toloka.yandex.com domain will be disabled starting April 1, 2023. Please use the toloka.dev domain for API requests.

Closes a training pool.

To stop assigning training tasks to Tolokers, close the training pool.

When you send requests, an operation is created. To track the progress of the operation, send a request to the /operations resource.

Request

Production version
Sandbox
POST https://toloka.dev/api/v1/trainings/<training_id>/close
Authorization: OAuth <OAuth token>

Path parameters

ParameterOverview
training_idPool ID.

Headers

TitleOverview
AuthorizationA token for account authorization. Add OAuth as a prefix.

Response

Note

If the current training pool status is the same as the requested status, an empty response with status 204 is returned.

{
"id": "52829015-033f-4c3a-a7cc-0d7eff235663",
"type": "TRAINING.CLOSE",
"status": "SUCCESS",
"submitted": "2021-02-26T10:13:32.921",
"started": "2021-02-26T10:13:32.921",
"finished": "2021-02-26T10:13:32.921",
"progress": 100,
"parameters": {
"training_id": "123456"
},
"details": {}
}
ParameterOverview
idstring

Operation ID.
typestring

Type of operation: TRAINING.CLOSE — Close a training pool.
status

string

The status of the operation:

  • PENDING — Not started yet.
  • RUNNING — In progress.
  • SUCCESS — Completed successfully.
  • FAIL — Not completed.
submittedstring

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

The UTC date and time the operation started, in ISO 8601 format: YYYY-MM-DDThh:mm:ss[.sss].
finishedstring

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

The percentage of the operation completed.
parameters.training_idstring

ID of the training pool.
detailsobject

Details of the operation completion.
Contact support
Toloka API
OverviewAccessing the APIRate limiting
Quick start
Reference
Project
Pools
Training
Subscriptions to events
Toloker selection
Ways to upload tasks
Tasks
Task suites
Tracking operations
Getting responses
Checking completed tasks
Rewards
Messages for Tolokers
Various parameters
Libraries