toloka.client.TolokaClient.find_assignments
| Source code
Finds assignments that match certain criteria.
The number of returned assignments is limited. To find remaining assignments call find_assignments
with updated search criteria.
To iterate over all matching assignments you may use the get_assignments method.
Parameters | Type | Description |
---|---|---|
status | Union[str, Assignment.Status, List[Union[str, Assignment.Status]], None] | Assignment status or a list of statuses. Refer to the Assignment.Status page for more information on the available |
task_id | Optional[str] | Assignments containing the task with the specified ID. |
task_suite_id | Optional[str] | Assignments for a task suite with the specified ID. |
pool_id | Optional[str] | Assignments in a pool with the specified ID. |
user_id | Optional[str] | Assignments from a Toloker with the specified ID. |
id_lt | Optional[str] | Assignments with IDs less than the specified value. |
id_lte | Optional[str] | Assignments with IDs less than or equal to the specified value. |
id_gt | Optional[str] | Assignments with IDs greater than the specified value. |
id_gte | Optional[str] | Assignments with IDs greater than or equal to the specified value. |
created_lt | Optional[datetime] | Task suites assigned before the specified date. |
created_lte | Optional[datetime] | Task suites assigned before or on the specified date. |
created_gt | Optional[datetime] | Task suites assigned after the specified date. |
created_gte | Optional[datetime] | Task suites assigned after or on the specified date. |
submitted_lt | Optional[datetime] | Assignments completed before the specified date. |
submitted_lte | Optional[datetime] | Assignments completed before or on the specified date. |
submitted_gt | Optional[datetime] | Assignments completed after the specified date. |
submitted_gte | Optional[datetime] | Assignments completed after or on the specified date. |
accepted_lt | Optional[datetime] | Assignments accepted before the specified date. |
accepted_lte | Optional[datetime] | Assignments accepted before or on the specified date. |
accepted_gt | Optional[datetime] | Assignments accepted after the specified date. |
accepted_gte | Optional[datetime] | Assignments accepted after or on the specified date. |
rejected_lt | Optional[datetime] | Assignments rejected before the specified date. |
rejected_lte | Optional[datetime] | Assignments rejected before or on the specified date. |
rejected_gt | Optional[datetime] | Assignments rejected after the specified date. |
rejected_gte | Optional[datetime] | Assignments rejected after or on the specified date. |
skipped_lt | Optional[datetime] | Assigned task suites skipped before the specified date. |
skipped_lte | Optional[datetime] | Assigned task suites skipped before or on the specified date. |
skipped_gt | Optional[datetime] | Assigned task suites skipped after the specified date. |
skipped_gte | Optional[datetime] | Assigned task suites skipped after or on the specified date. |
expired_lt | Optional[datetime] | Assigned task suites expired before the specified date. |
expired_lte | Optional[datetime] | Assigned task suites expired before or on the specified date. |
expired_gt | Optional[datetime] | Assigned task suites expired after the specified date. |
expired_gte | Optional[datetime] | Assigned task suites expired after or on the specified date. |
sort | Union[List[str], AssignmentSortItems, None] | Sorting options. Default: |
limit | Optional[int] | Returned assignments limit. The maximum allowed value: 100,000. The default value: 50. |
Returns:
Found assignments and a flag showing whether there are more matching assignments.
Return type:
Examples:
Search for SKIPPED
or EXPIRED
assignments in the specified pool.
find_result = toloka_client.find_assignments( pool_id='1080020', status=['SKIPPED', 'EXPIRED'])assignments = find_result.items
Last updated: August 28, 2023