get_operation

toloka.async_client.client.AsyncTolokaClient.get_operation | Source code

async get_operation(self, operation_id: str)

Gets information about an operation from Toloka.

Some API requests, for example uploading tasks or opening a pool, are processed as asynchronous operations that run in the background. You can track their progress or wait for them to complete by calling the wait_operation method.

Parameters description

ParametersTypeDescription
operation_idstr

The ID of the operation.

  • Returns:

    The operation.

  • Return type:

    Operation

Examples:

operation = toloka_client.get_operation(operation_id='6d84114f-fcfc-473d-8249-1a4f3ea550eb')
print(operation.status, operation.finished)

Last updated: August 28, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming