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
Parameters | Type | Description |
---|---|---|
type |
Optional[OperationType] | Operation type. Refer to the OperationType page for more information on the available |
status |
Optional[Operation.Status] | The status of the operation. Refer to the Operation.Status page for more information on the available |
id_lt |
Optional[str] | Operations with IDs less than the specified value. |
id_lte |
Optional[str] | Operations with IDs less than or equal to the specified value. |
id_gt |
Optional[str] | Operations with IDs greater than the specified value. |
id_gte |
Optional[str] | Operations with IDs greater than or equal to the specified value. |
submitted_lt |
Optional[datetime] | Operations submitted before the specified date. |
submitted_lte |
Optional[datetime] | Operations submitted before or on the specified date. |
submitted_gt |
Optional[datetime] | Operations submitted after the specified date. |
submitted_gte |
Optional[datetime] | Operations submitted after or on the specified date. |
finished_lt |
Optional[datetime] | Operations finished before the specified date. |
finished_lte |
Optional[datetime] | Operations finished before or on the specified date. |
finished_gt |
Optional[datetime] | Operations finished after the specified date. |
finished_gte |
Optional[datetime] | Operations finished after or on the specified date. |
sort |
Union[List[str], OperationSortItems, None] | Sorting options. Default: |
limit |
Optional[int] | Returned operations limit. The default limit is 50. The maximum allowed limit is 500. |
-
Returns:
Found operations and a flag showing whether there are more matching task suites exceeding the limit.
-
Return type:
Examples:
toloka_client.find_operations(type='POOL_OPEN', status='SUCCESS', sort=['-finished'], limit=3)