Get the operation log
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:
- When you create one or multiple tasks.
- When you create one or multiple task suites.
- When issuing rewards to Tolokers.
If the operation was successful, the log contains IDs
of the created objects, otherwise it contains the details of validation errors.
Request
GET https://toloka.yandex.com/api/v1/operations/<operation_id>/log
Authorization: OAuth <OAuth token>
GET https://sandbox.toloka.yandex.com/api/v1/operations/<operation_id>/log
Authorization: OAuth <OAuth token>
Path parameters
Parameter | Overview |
---|---|
operation_id | Operation ID. |
Headers
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:
The
The
The type of operation step determines the |
success |
boolean Step result:
|
input |
JSON
The data in the |
output |
JSON Output values at the operation step. The data in the
Data in the
|
[
{
"type": "USER_BONUS_PERSIST",
"success": true,
"input": {
"id": 65,
"amount": 1.5,
"created": "2021-02-02T12:51:00",
"user_id": "ec00d2407f7241258d0faba610110d95",
"public_title": {
"EN": "Good job!",
"RU": "Молодец!"
},
"public_message": {
"EN": "Ten tasks completed",
"RU": "Выполнено 10 заданий"
},
"private_comment": "pool_123456",
"without_message": false
},
"output": {
"user_bonus_id": "2128"
}
}
]
[
{
"type": "USER_BONUS_VALIDATE",
"success": false,
"input": {
"id": 65,
"amount": 1.5,
"created": "2021-02-02T12:51:00",
"user_id": "ec00d2407f7241258d0faba610110d95",
"public_title": {
"EN": "Good job!",
"RU": "Молодец!"
},
"public_message": {
"EN": "Ten tasks completed",
"RU": "Выполнено 10 заданий"
},
"private_comment": "pool_123456",
"without_message": false
},
"output": {
"user_id": {
"code": "ENTITY_DOES_NOT_EXIST",
"message": "Entity does not exist"
}
}
}
]