Get the operation log
The toloka.yandex.com
domain will be disabled starting May 1, 2023. Please use the toloka.dev
domain for API requests.
Gets the operation log.
You can get logs for asynchronous operations (async_mode = true
). Such operations run in the background.
Logs are available only for the last month. To get the logs for an earlier period, contact support.
You can get the operation log:
If the operation was successful, the log contains IDs
of the created objects, otherwise it contains the details of validation errors.
Request
Production version
Sandbox
GET https://toloka.dev/api/v1/operations/<operation_id>/log
Authorization: OAuth <OAuth token>
Path parameters
Parameter | Overview |
---|
operation_id | Operation ID. |
Title | Overview |
---|
Authorization | A token for account authorization. Add OAuth as a prefix. |
Response
Contains a JSON array describing each step of the operation.
[
{
"type": <action type>,
"success": <true/false>,
"input": {
<input values at the operation step>
},
"output": {
<output values at the operation step or error details>
}
},
...
]
Parameter | Overview |
---|
type | string
Type of operation step. It depends on: Type of operation for which the log is requested. Execution result (success: true/false ).
The type values for a successful asynchronous operation: USER_BONUS_PERSIST — Issuing a reward.
TASK_CREATE — Creating a task.
TASK_SUITE_CREATE — Creating a task suite.
The type values for a failed asynchronous operation:
USER_BONUS_VALIDATE — Issuing a reward.
TASK_VALIDATE — Creating a task.
TASK_SUITE_VALIDATE — Creating a task suite.
The type of operation step determines the input and output values.
|
success | boolean
Step result: true — Completed successfully.false — Not completed.
|
input | JSON
The data in the input is copied from the input data passed when creating the operation. |
output | JSON
Output values at the operation step.
The data in the output for a successful operation: For the action USER_BONUS_PERSIST — user_bonus_id (the ID of the issued reward). For the action TASK_CREATE — task_id (the ID of the created task). For the action TASK_SUITE_CREATE — task_suite_id (the ID of the created task suite).
Data in the output for a failed operation: code — Name of the error.
message — Explanation of how to fix the error.
payload — Specifies the error reason if code = VALIDATION_ERROR .
|
Example of a log when a reward was issued successfully
Example of a log when issuing a reward failed
Contact support