find_operations

toloka.client.TolokaClient.find_operations | Source code

Finds operations that match certain criteria.

The number of returned operations is limited. To find remaining operations call find_operations with updated search criteria.

To iterate over all matching operations you may use the get_operations method.

Parameters description

ParametersTypeDescription
typeOptional[OperationType]

Operation type. Refer to the OperationType page for more information on the available type values.

statusOptional[Operation.Status]

The status of the operation. Refer to the Operation.Status page for more information on the available status values.

id_ltOptional[str]

Operations with IDs less than the specified value.

id_lteOptional[str]

Operations with IDs less than or equal to the specified value.

id_gtOptional[str]

Operations with IDs greater than the specified value.

id_gteOptional[str]

Operations with IDs greater than or equal to the specified value.

submitted_ltOptional[datetime]

Operations submitted before the specified date.

submitted_lteOptional[datetime]

Operations submitted before or on the specified date.

submitted_gtOptional[datetime]

Operations submitted after the specified date.

submitted_gteOptional[datetime]

Operations submitted after or on the specified date.

finished_ltOptional[datetime]

Operations finished before the specified date.

finished_lteOptional[datetime]

Operations finished before or on the specified date.

finished_gtOptional[datetime]

Operations finished after the specified date.

finished_gteOptional[datetime]

Operations finished after or on the specified date.

sortUnion[List[str], OperationSortItems, None]

Sorting options. Default: None.

limitOptional[int]

Returned operations limit. The maximum allowed value: 500. The default value: 50.

  • Returns:

    Found operations and a flag showing whether there are more matching operations exceeding the limit.

  • Return type:

    OperationSearchResult

Examples:

find_result = toloka_client.find_operations(
type='POOL.OPEN', status='SUCCESS', sort=['-finished'], limit=3
)
operations = find_result.items

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