openapi: 3.1.0 info: title: API Reference subpackage_actions subpackage_projects.subpackage_projects/assignments API version: 1.0.0 servers: - url: http://localhost:8000 tags: - name: subpackage_projects.subpackage_projects/assignments paths: /api/projects/{id}/tasks/assignees: post: operationId: bulk-assign summary: ✨ Bulk assign users to tasks description: "\n \"Label\n

\n This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n

\n
\nAssign multiple users to a collection of tasks within a specific project." tags: - subpackage_projects.subpackage_projects/assignments parameters: - name: id in: path required: true schema: type: integer - name: Authorization in: header description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example:
curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"
' required: true schema: type: string responses: '201': description: Success content: application/json: schema: $ref: '#/components/schemas/projects_assignments_bulk_assign_Response_201' '400': description: Can't assign tasks content: application/json: schema: description: Any type requestBody: content: application/json: schema: type: object properties: filters: $ref: '#/components/schemas/ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFilters' description: 'Filters to apply on tasks. You can use [the helper class `Filters` from this page](https://labelstud.io/sdk/data_manager.html) to create Data Manager Filters.
Example: `{"conjunction": "or", "items": [{"filter": "filter:tasks:completed_at", "operator": "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}`' selectedItems: $ref: '#/components/schemas/ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaSelectedItems' description: 'Task selection by IDs. If filters are applied, the selection will be applied to the filtered tasks.If "all" is `false`, `"included"` must be used. If "all" is `true`, `"excluded"` must be used.
Examples: `{"all": false, "included": [1, 2, 3]}` or `{"all": true, "excluded": [4, 5]}`' type: $ref: '#/components/schemas/ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaType' description: Assignment type. Use AN for annotate or RE for review. users: type: array items: type: integer description: List of user IDs to assign required: - selectedItems - type - users /api/projects/{id}/tasks/{task_pk}/assignees: get: operationId: list summary: ✨ Get assigned tasks and assignees description: "\n \"Label\n

\n This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n

\n
\nRetrieve a list of tasks and assignees for those tasks for a specific project." tags: - subpackage_projects.subpackage_projects/assignments parameters: - name: id in: path description: A unique integer value identifying this project. required: true schema: type: integer - name: task_pk in: path description: A unique integer value identifying this task. required: true schema: type: integer - name: Authorization in: header description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example:
curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"
' required: true schema: type: string responses: '200': description: List of assignments for the task content: application/json: schema: type: array items: $ref: '#/components/schemas/TaskAssignment' post: operationId: assign summary: ✨ Create task assignee description: "\n \"Label\n

\n This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n

\n
\nAssign a user to a task in a specific project." tags: - subpackage_projects.subpackage_projects/assignments parameters: - name: id in: path description: A unique integer value identifying this project. required: true schema: type: integer - name: task_pk in: path description: A unique integer value identifying this task. required: true schema: type: integer - name: Authorization in: header description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example:
curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"
' required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/TaskAssignment' requestBody: content: application/json: schema: type: object properties: type: $ref: '#/components/schemas/ApiProjectsIdTasksTaskPkAssigneesPostRequestBodyContentApplicationJsonSchemaType' description: Assignment type. Use AN for annotate or RE for review. users: type: array items: type: integer description: List of user IDs to assign required: - type - users delete: operationId: delete summary: ✨ Delete task assignments description: "\n \"Label\n

\n This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n

\n
\nRemove assignees for a task within a specific project." tags: - subpackage_projects.subpackage_projects/assignments parameters: - name: id in: path description: A unique integer value identifying this project. required: true schema: type: integer - name: task_pk in: path description: A unique integer value identifying this task. required: true schema: type: integer - name: type in: query description: Assignment type to delete (optional). If omitted, deletes all assignments for the task. required: false schema: $ref: '#/components/schemas/ApiProjectsIdTasksTaskPkAssigneesDeleteParametersType' - name: users in: query description: Comma separated list of user IDs to delete, as a string. If omitted, deletes all assignees for the given type. required: false schema: type: string - name: Authorization in: header description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example:
curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"
' required: true schema: type: string responses: '200': description: Successful response patch: operationId: update summary: ✨ Update task assignee description: "\n \"Label\n

\n This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)\n

\n
\nUpdate the assignee for a task in a specific project." tags: - subpackage_projects.subpackage_projects/assignments parameters: - name: id in: path description: A unique integer value identifying this project. required: true schema: type: integer - name: task_pk in: path description: A unique integer value identifying this task. required: true schema: type: integer - name: Authorization in: header description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example:
curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"
' required: true schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/TaskAssignment' requestBody: content: application/json: schema: type: object properties: type: $ref: '#/components/schemas/ApiProjectsIdTasksTaskPkAssigneesPatchRequestBodyContentApplicationJsonSchemaType' description: Assignment type. Use AN for annotate or RE for review. users: type: array items: type: integer description: List of user IDs to assign required: - type - users components: schemas: ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaSelectedItems0: type: object properties: all: type: boolean description: No tasks are selected included: type: array items: type: integer description: List of included task IDs required: - all title: ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaSelectedItems0 TypeEnum: type: string enum: - AN - RE description: '* `AN` - Annotate * `RE` - Review' title: TypeEnum ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFiltersItemsItemsFilter: type: string enum: - filter:tasks:agreement - filter:tasks:annotations_results - filter:tasks:annotators - filter:tasks:cancelled_annotations - filter:tasks:comments - filter:tasks:completed_at - filter:tasks:created_at - filter:tasks:file_upload - filter:tasks:ground_truth - filter:tasks:id - filter:tasks:inner_id - filter:tasks:predictions_model_versions - filter:tasks:predictions_results - filter:tasks:predictions_score - filter:tasks:reviewed - filter:tasks:reviewers - filter:tasks:reviews_accepted - filter:tasks:reviews_rejected - filter:tasks:total_annotations - filter:tasks:total_predictions - filter:tasks:unresolved_comment_count - filter:tasks:updated_at description: 'Filter identifier, it should start with `filter:tasks:` prefix, e.g. `filter:tasks:agreement`. For `task.data` fields it may look like `filter:tasks:data.field_name`. If you need more info about columns, check the [Get data manager columns](#tag/Data-Manager/operation/api_dm_columns_list) API endpoint. Possible values:
  • `filter:tasks:agreement`
    (Number) Agreement for annotation results for a specific task (Enterprise only)

  • `filter:tasks:annotations_results`
    (String) Annotation results for the tasks

  • `filter:tasks:annotators`
    (List) Annotators that completed the task (Community). Can include assigned annotators (Enterprise only). Important note: the filter `type` should be List, but the filter `value` is integer

  • `filter:tasks:cancelled_annotations`
    (Number) Number of cancelled or skipped annotations for the task

  • `filter:tasks:comments`
    (Number) Number of comments in a task

  • `filter:tasks:completed_at`
    (Datetime) Time when a task was fully annotated

  • `filter:tasks:created_at`
    (Datetime) Time the task was created at

  • `filter:tasks:file_upload`
    (String) Name of the file uploaded to create the tasks

  • `filter:tasks:ground_truth`
    (Boolean) Ground truth status of the tasks

  • `filter:tasks:id`
    (Number) Task ID

  • `filter:tasks:inner_id`
    (Number) Task Inner ID, it starts from 1 for all projects

  • `filter:tasks:predictions_model_versions`
    (String) Model version used for the predictions

  • `filter:tasks:predictions_results`
    (String) Prediction results for the tasks

  • `filter:tasks:predictions_score`
    (Number) Prediction score for the task

  • `filter:tasks:reviewed`
    (Boolean) Whether the tasks have been reviewed (Enterprise only)

  • `filter:tasks:reviewers`
    (String) Reviewers that reviewed the task, or assigned reviewers (Enterprise only). Important note: the filter `type` should be List, but the filter `value` is integer

  • `filter:tasks:reviews_accepted`
    (Number) Number of annotations accepted for a task in review (Enterprise only)

  • `filter:tasks:reviews_rejected`
    (Number) Number of annotations rejected for a task in review (Enterprise only)

  • `filter:tasks:total_annotations`
    (Number) Total number of annotations on a task

  • `filter:tasks:total_predictions`
    (Number) Total number of predictions for the task

  • `filter:tasks:unresolved_comment_count`
    (Number) Number of unresolved comments in a task

  • `filter:tasks:updated_at`
    (Datetime) Time the task was updated at (e.g. new annotation was created, review added, etc)
  • ' title: ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFiltersItemsItemsFilter TaskAssignment: type: object properties: assignee: type: integer description: Assigned user created_at: type: string format: date-time description: Time of assignment id: type: integer state: type: string task: type: integer description: Assigned task type: $ref: '#/components/schemas/TypeEnum' description: 'Type of assignment: Annotate|Review * `AN` - Annotate * `RE` - Review' required: - assignee - created_at - id - state - task description: 'TaskAssignment Serializer with FSM state support. Note: The ''state'' field will be populated from the queryset annotation if present, preventing N+1 queries. Use .with_state() on your queryset. The state field display is controlled by both: - fflag_feat_fit_568_finite_state_management (FSM background calculations) - fflag_feat_fit_710_fsm_state_fields (state field display in APIs)' title: TaskAssignment ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaType: type: string enum: - AN - RE description: Assignment type. Use AN for annotate or RE for review. title: ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaType ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaSelectedItems: oneOf: - $ref: '#/components/schemas/ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaSelectedItems0' - $ref: '#/components/schemas/ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaSelectedItems1' description: 'Task selection by IDs. If filters are applied, the selection will be applied to the filtered tasks.If "all" is `false`, `"included"` must be used. If "all" is `true`, `"excluded"` must be used.
    Examples: `{"all": false, "included": [1, 2, 3]}` or `{"all": true, "excluded": [4, 5]}`' title: ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaSelectedItems ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFiltersItemsItems: type: object properties: filter: $ref: '#/components/schemas/ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFiltersItemsItemsFilter' description: 'Filter identifier, it should start with `filter:tasks:` prefix, e.g. `filter:tasks:agreement`. For `task.data` fields it may look like `filter:tasks:data.field_name`. If you need more info about columns, check the [Get data manager columns](#tag/Data-Manager/operation/api_dm_columns_list) API endpoint. Possible values:
  • `filter:tasks:agreement`
    (Number) Agreement for annotation results for a specific task (Enterprise only)

  • `filter:tasks:annotations_results`
    (String) Annotation results for the tasks

  • `filter:tasks:annotators`
    (List) Annotators that completed the task (Community). Can include assigned annotators (Enterprise only). Important note: the filter `type` should be List, but the filter `value` is integer

  • `filter:tasks:cancelled_annotations`
    (Number) Number of cancelled or skipped annotations for the task

  • `filter:tasks:comments`
    (Number) Number of comments in a task

  • `filter:tasks:completed_at`
    (Datetime) Time when a task was fully annotated

  • `filter:tasks:created_at`
    (Datetime) Time the task was created at

  • `filter:tasks:file_upload`
    (String) Name of the file uploaded to create the tasks

  • `filter:tasks:ground_truth`
    (Boolean) Ground truth status of the tasks

  • `filter:tasks:id`
    (Number) Task ID

  • `filter:tasks:inner_id`
    (Number) Task Inner ID, it starts from 1 for all projects

  • `filter:tasks:predictions_model_versions`
    (String) Model version used for the predictions

  • `filter:tasks:predictions_results`
    (String) Prediction results for the tasks

  • `filter:tasks:predictions_score`
    (Number) Prediction score for the task

  • `filter:tasks:reviewed`
    (Boolean) Whether the tasks have been reviewed (Enterprise only)

  • `filter:tasks:reviewers`
    (String) Reviewers that reviewed the task, or assigned reviewers (Enterprise only). Important note: the filter `type` should be List, but the filter `value` is integer

  • `filter:tasks:reviews_accepted`
    (Number) Number of annotations accepted for a task in review (Enterprise only)

  • `filter:tasks:reviews_rejected`
    (Number) Number of annotations rejected for a task in review (Enterprise only)

  • `filter:tasks:total_annotations`
    (Number) Total number of annotations on a task

  • `filter:tasks:total_predictions`
    (Number) Total number of predictions for the task

  • `filter:tasks:unresolved_comment_count`
    (Number) Number of unresolved comments in a task

  • `filter:tasks:updated_at`
    (Datetime) Time the task was updated at (e.g. new annotation was created, review added, etc)
  • ' operator: $ref: '#/components/schemas/ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFiltersItemsItemsOperator' description: 'Filter operator. Possible values:
  • `contains`
    Contains

  • `ends_with`
    Ends with

  • `equal`
    Equal to

  • `exists`
    Exists

  • `greater`
    Greater than

  • `greater_or_equal`
    Greater than or equal to

  • `in`
    Is between min and max values, so the filter `value` should be e.g. `{"min": 1, "max": 7}`

  • `less`
    Less than

  • `less_or_equal`
    Less than or equal to

  • `not_contains`
    Does not contain

  • `not_equal`
    Not equal to

  • `not_exists`
    Does not exist

  • `not_in`
    Is not between min and max values, so the filter `value` should be e.g. `{"min": 1, "max": 7}`

  • `starts_with`
    Starts with
  • ' type: type: string description: Type of the filter value. Possible values:
  • `Boolean`
    Boolean

  • `Datetime`
    Datetime string in `strftime('%Y-%m-%dT%H:%M:%S.%fZ')` format

  • `List`
    List of items

  • `Number`
    Float or Integer

  • `String`
    String

  • `Unknown`
    Unknown is explicitly converted to string format
  • value: $ref: '#/components/schemas/ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFiltersItemsItemsValue' description: Value to filter by required: - filter - operator - type - value title: ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFiltersItemsItems ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaSelectedItems1: type: object properties: all: type: boolean description: All tasks are selected excluded: type: array items: type: integer description: List of excluded task IDs required: - all title: ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaSelectedItems1 ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFiltersConjunction: type: string enum: - or - and description: Logical conjunction for the filters. This conjunction (either "or" or "and") will be applied to all items in the filters list. It is not possible to combine "or" and "and" within one list of filters. All filters will be either combined with "or" or with "and", but not a mix of both. title: ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFiltersConjunction ApiProjectsIdTasksTaskPkAssigneesDeleteParametersType: type: string enum: - AN - RE title: ApiProjectsIdTasksTaskPkAssigneesDeleteParametersType ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFiltersItemsItemsOperator: type: string enum: - contains - ends_with - equal - exists - greater - greater_or_equal - in - less - less_or_equal - not_contains - not_equal - not_exists - not_in - starts_with description: 'Filter operator. Possible values:
  • `contains`
    Contains

  • `ends_with`
    Ends with

  • `equal`
    Equal to

  • `exists`
    Exists

  • `greater`
    Greater than

  • `greater_or_equal`
    Greater than or equal to

  • `in`
    Is between min and max values, so the filter `value` should be e.g. `{"min": 1, "max": 7}`

  • `less`
    Less than

  • `less_or_equal`
    Less than or equal to

  • `not_contains`
    Does not contain

  • `not_equal`
    Not equal to

  • `not_exists`
    Does not exist

  • `not_in`
    Is not between min and max values, so the filter `value` should be e.g. `{"min": 1, "max": 7}`

  • `starts_with`
    Starts with
  • ' title: ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFiltersItemsItemsOperator ApiProjectsIdTasksTaskPkAssigneesPatchRequestBodyContentApplicationJsonSchemaType: type: string enum: - AN - RE description: Assignment type. Use AN for annotate or RE for review. title: ApiProjectsIdTasksTaskPkAssigneesPatchRequestBodyContentApplicationJsonSchemaType ApiProjectsIdTasksTaskPkAssigneesPostRequestBodyContentApplicationJsonSchemaType: type: string enum: - AN - RE description: Assignment type. Use AN for annotate or RE for review. title: ApiProjectsIdTasksTaskPkAssigneesPostRequestBodyContentApplicationJsonSchemaType ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFilters: type: object properties: conjunction: $ref: '#/components/schemas/ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFiltersConjunction' description: Logical conjunction for the filters. This conjunction (either "or" or "and") will be applied to all items in the filters list. It is not possible to combine "or" and "and" within one list of filters. All filters will be either combined with "or" or with "and", but not a mix of both. items: type: array items: $ref: '#/components/schemas/ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFiltersItemsItems' description: List of filter items required: - conjunction - items description: 'Filters to apply on tasks. You can use [the helper class `Filters` from this page](https://labelstud.io/sdk/data_manager.html) to create Data Manager Filters.
    Example: `{"conjunction": "or", "items": [{"filter": "filter:tasks:completed_at", "operator": "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}`' title: ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFilters projects_assignments_bulk_assign_Response_201: type: object properties: assignments: type: integer async: type: boolean title: projects_assignments_bulk_assign_Response_201 ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFiltersItemsItemsValue: oneOf: - type: string - type: integer - type: number format: double - type: boolean - type: object additionalProperties: description: Any type - type: object additionalProperties: description: Any type description: Value to filter by title: ApiProjectsIdTasksAssigneesPostRequestBodyContentApplicationJsonSchemaFiltersItemsItemsValue securitySchemes: Token: type: apiKey in: header name: Authorization description: 'The token (or API key) must be passed as a request header. You can find your user token on the User Account page in Label Studio. Example:
    curl https://label-studio-host/api/projects -H "Authorization: Token [your-token]"
    '