Get the operation log

When creating multiple task suites, you can get the operation log. The log contains information about validation errors and about created task suites.

Logs are available only for the last month. To get the logs for the earlier period, please contact support service.

To get the log, send a GET request to the resource /operations/<id операции>/log.

Request

GET /api/v1/operations/<operation ID>/log

Host: https://sandbox.toloka.yandex.ru
Authorization: OAuth <OAuth token>

Response

Contains a JSON array describing each step of the operation.

[ 
  {
    "type": <type of action>,
    "success": <true/false>,
    "input": { 
      <input values at the operation step> 
    },
    "output": { 
      <output values for the step or details of the error>
    }
  },
  ...
]
Key descriptions

Key

Value

Data type

type

Type of the operation step:

  • TASK_SUITE_VALIDATE — Task suite validation.

  • TASK_SUITE_CREATE — Task suite creation.

The type of operation step determines the input and output values.

String

success

Step result:

  • true — Completed successfully.

  • false — Not completed.

String

input

Input values at the operation step.

JSON

output

Output values at the operation step.

For the TASK_SUITE_VALIDATE step, this is task suite validation errors.

For the TASK_SUITE_CREATE step (if completed successfully), this is the created task suites.

JSON

Example:

[
    {
        "input": {
            "pool_id": "1",
            "tasks": [
                {
                    "input_values": {
                        "image_url": "www.image1.ru"
                    }
                },
                {
                    "input_values": {
                        "image_url": "www.image2.ru"
                    }
                }
            ]
        },
        "output": {
            "overlap": {
                "code": "VALUE_REQUIRED",
                "message": "You must specify overlap, if it is not infinite",
                "params": []
            }
        },
        "success": false,
        "type": "TASK_SUITE_VALIDATE"
    },
    {
        "input": {<...>
        },
        "output": {<...>
        },
        "success": false,
        "type": "TASK_SUITE_VALIDATE"
    }
]