> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Query Annotation Queues

> Query annotation queues in the user's organization with filtering and sorting.

Response includes num_templates for each queue to support copy selection UI.



## OpenAPI

````yaml https://api.galileo.ai/public/v2/openapi.json post /v2/annotation_queues/query
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.galileo.ai
    description: Galileo Public APIs - galileo-v2
security: []
paths:
  /v2/annotation_queues/query:
    post:
      tags:
        - annotation_queue
      summary: Query Annotation Queues
      description: >-
        Query annotation queues in the user's organization with filtering and
        sorting.


        Response includes num_templates for each queue to support copy selection
        UI.
      operationId: query_annotation_queues_v2_annotation_queues_query_post
      parameters:
        - name: starting_token
          in: query
          required: false
          schema:
            type: integer
            title: Starting Token
            default: 0
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            title: Limit
            default: 100
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListAnnotationQueueParams'
              default:
                filters: []
                sort:
                  name: created_at
                  ascending: false
                  sort_type: column
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAnnotationQueueResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - OAuth2PasswordBearer: []
components:
  schemas:
    ListAnnotationQueueParams:
      properties:
        filters:
          items:
            oneOf:
              - $ref: '#/components/schemas/AnnotationQueueIDFilter'
              - $ref: '#/components/schemas/AnnotationQueueNameFilter'
              - $ref: '#/components/schemas/AnnotationQueueProjectFilter'
              - $ref: '#/components/schemas/AnnotationQueueCreatedAtFilter'
              - $ref: '#/components/schemas/AnnotationQueueUpdatedAtFilter'
              - $ref: '#/components/schemas/AnnotationQueueNumLogRecordsFilter'
              - $ref: '#/components/schemas/AnnotationQueueNumAnnotatorsFilter'
              - $ref: '#/components/schemas/AnnotationQueueNumUsersFilter'
              - $ref: '#/components/schemas/AnnotationQueueOverallProgressFilter'
              - $ref: '#/components/schemas/AnnotationQueueNumTemplatesFilter'
            discriminator:
              propertyName: name
              mapping:
                created_at:
                  $ref: '#/components/schemas/AnnotationQueueCreatedAtFilter'
                id:
                  $ref: '#/components/schemas/AnnotationQueueIDFilter'
                name:
                  $ref: '#/components/schemas/AnnotationQueueNameFilter'
                num_annotators:
                  $ref: '#/components/schemas/AnnotationQueueNumAnnotatorsFilter'
                num_log_records:
                  $ref: '#/components/schemas/AnnotationQueueNumLogRecordsFilter'
                num_templates:
                  $ref: '#/components/schemas/AnnotationQueueNumTemplatesFilter'
                num_users:
                  $ref: '#/components/schemas/AnnotationQueueNumUsersFilter'
                overall_progress:
                  $ref: '#/components/schemas/AnnotationQueueOverallProgressFilter'
                project_id:
                  $ref: '#/components/schemas/AnnotationQueueProjectFilter'
                updated_at:
                  $ref: '#/components/schemas/AnnotationQueueUpdatedAtFilter'
          type: array
          title: Filters
        sort:
          anyOf:
            - oneOf:
                - $ref: '#/components/schemas/AnnotationQueueNameSort'
                - $ref: '#/components/schemas/AnnotationQueueCreatedAtSort'
                - $ref: '#/components/schemas/AnnotationQueueUpdatedAtSort'
                - $ref: '#/components/schemas/AnnotationQueueCreatedBySort'
                - $ref: '#/components/schemas/AnnotationQueueNumUsersSort'
                - $ref: '#/components/schemas/AnnotationQueueNumLogRecordsSort'
                - $ref: '#/components/schemas/AnnotationQueueNumTemplatesSort'
                - $ref: '#/components/schemas/AnnotationQueueNumAnnotatorsSort'
                - $ref: '#/components/schemas/AnnotationQueueOverallProgressSort'
              discriminator:
                propertyName: name
                mapping:
                  created_at:
                    $ref: '#/components/schemas/AnnotationQueueCreatedAtSort'
                  created_by:
                    $ref: '#/components/schemas/AnnotationQueueCreatedBySort'
                  name:
                    $ref: '#/components/schemas/AnnotationQueueNameSort'
                  num_annotators:
                    $ref: '#/components/schemas/AnnotationQueueNumAnnotatorsSort'
                  num_log_records:
                    $ref: '#/components/schemas/AnnotationQueueNumLogRecordsSort'
                  num_templates:
                    $ref: '#/components/schemas/AnnotationQueueNumTemplatesSort'
                  num_users:
                    $ref: '#/components/schemas/AnnotationQueueNumUsersSort'
                  overall_progress:
                    $ref: '#/components/schemas/AnnotationQueueOverallProgressSort'
                  updated_at:
                    $ref: '#/components/schemas/AnnotationQueueUpdatedAtSort'
            - type: 'null'
          title: Sort
          default:
            name: created_at
            ascending: false
            sort_type: column
      type: object
      title: ListAnnotationQueueParams
    ListAnnotationQueueResponse:
      properties:
        starting_token:
          type: integer
          title: Starting Token
          default: 0
        limit:
          type: integer
          title: Limit
          default: 100
        paginated:
          type: boolean
          title: Paginated
          default: false
        next_starting_token:
          anyOf:
            - type: integer
            - type: 'null'
          title: Next Starting Token
        annotation_queues:
          items:
            $ref: '#/components/schemas/AnnotationQueueResponse'
          type: array
          title: Annotation Queues
      type: object
      required:
        - annotation_queues
      title: ListAnnotationQueueResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AnnotationQueueIDFilter:
      properties:
        name:
          type: string
          const: id
          title: Name
          default: id
        operator:
          type: string
          enum:
            - eq
            - ne
            - one_of
            - not_in
            - contains
          title: Operator
          default: eq
        value:
          anyOf:
            - type: string
              format: uuid4
            - items:
                anyOf:
                  - type: string
                    format: uuid4
                  - type: string
              type: array
            - type: string
          title: Value
      type: object
      required:
        - value
      title: AnnotationQueueIDFilter
    AnnotationQueueNameFilter:
      properties:
        name:
          type: string
          const: name
          title: Name
          default: name
        operator:
          type: string
          enum:
            - eq
            - ne
            - contains
            - one_of
            - not_in
          title: Operator
        value:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
          title: Value
        case_sensitive:
          type: boolean
          title: Case Sensitive
          default: true
      type: object
      required:
        - operator
        - value
      title: AnnotationQueueNameFilter
    AnnotationQueueProjectFilter:
      properties:
        name:
          type: string
          const: project_id
          title: Name
          default: project_id
        value:
          type: string
          format: uuid4
          title: Value
      type: object
      required:
        - value
      title: AnnotationQueueProjectFilter
    AnnotationQueueCreatedAtFilter:
      properties:
        name:
          type: string
          const: created_at
          title: Name
          default: created_at
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
          title: Operator
        value:
          type: string
          format: date-time
          title: Value
      type: object
      required:
        - operator
        - value
      title: AnnotationQueueCreatedAtFilter
    AnnotationQueueUpdatedAtFilter:
      properties:
        name:
          type: string
          const: updated_at
          title: Name
          default: updated_at
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
          title: Operator
        value:
          type: string
          format: date-time
          title: Value
      type: object
      required:
        - operator
        - value
      title: AnnotationQueueUpdatedAtFilter
    AnnotationQueueNumLogRecordsFilter:
      properties:
        name:
          type: string
          const: num_log_records
          title: Name
          default: num_log_records
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
            - between
          title: Operator
        value:
          anyOf:
            - type: integer
            - type: number
            - items:
                type: integer
              type: array
            - items:
                type: number
              type: array
          title: Value
      type: object
      required:
        - operator
        - value
      title: AnnotationQueueNumLogRecordsFilter
    AnnotationQueueNumAnnotatorsFilter:
      properties:
        name:
          type: string
          const: num_annotators
          title: Name
          default: num_annotators
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
            - between
          title: Operator
        value:
          anyOf:
            - type: integer
            - type: number
            - items:
                type: integer
              type: array
            - items:
                type: number
              type: array
          title: Value
      type: object
      required:
        - operator
        - value
      title: AnnotationQueueNumAnnotatorsFilter
    AnnotationQueueNumUsersFilter:
      properties:
        name:
          type: string
          const: num_users
          title: Name
          default: num_users
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
            - between
          title: Operator
        value:
          anyOf:
            - type: integer
            - type: number
            - items:
                type: integer
              type: array
            - items:
                type: number
              type: array
          title: Value
      type: object
      required:
        - operator
        - value
      title: AnnotationQueueNumUsersFilter
    AnnotationQueueOverallProgressFilter:
      properties:
        name:
          type: string
          const: overall_progress
          title: Name
          default: overall_progress
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
            - between
          title: Operator
        value:
          anyOf:
            - type: integer
            - type: number
            - items:
                type: integer
              type: array
            - items:
                type: number
              type: array
          title: Value
      type: object
      required:
        - operator
        - value
      title: AnnotationQueueOverallProgressFilter
    AnnotationQueueNumTemplatesFilter:
      properties:
        name:
          type: string
          const: num_templates
          title: Name
          default: num_templates
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
            - between
          title: Operator
        value:
          anyOf:
            - type: integer
            - type: number
            - items:
                type: integer
              type: array
            - items:
                type: number
              type: array
          title: Value
      type: object
      required:
        - operator
        - value
      title: AnnotationQueueNumTemplatesFilter
    AnnotationQueueNameSort:
      properties:
        name:
          type: string
          const: name
          title: Name
          default: name
        ascending:
          type: boolean
          title: Ascending
          default: true
        sort_type:
          type: string
          const: column
          title: Sort Type
          default: column
      type: object
      title: AnnotationQueueNameSort
    AnnotationQueueCreatedAtSort:
      properties:
        name:
          type: string
          const: created_at
          title: Name
          default: created_at
        ascending:
          type: boolean
          title: Ascending
          default: true
        sort_type:
          type: string
          const: column
          title: Sort Type
          default: column
      type: object
      title: AnnotationQueueCreatedAtSort
    AnnotationQueueUpdatedAtSort:
      properties:
        name:
          type: string
          const: updated_at
          title: Name
          default: updated_at
        ascending:
          type: boolean
          title: Ascending
          default: true
        sort_type:
          type: string
          const: column
          title: Sort Type
          default: column
      type: object
      title: AnnotationQueueUpdatedAtSort
    AnnotationQueueCreatedBySort:
      properties:
        name:
          type: string
          const: created_by
          title: Name
          default: created_by
        ascending:
          type: boolean
          title: Ascending
          default: true
        sort_type:
          type: string
          const: column
          title: Sort Type
          default: column
      type: object
      title: AnnotationQueueCreatedBySort
    AnnotationQueueNumUsersSort:
      properties:
        name:
          type: string
          const: num_users
          title: Name
          default: num_users
        ascending:
          type: boolean
          title: Ascending
          default: true
        sort_type:
          type: string
          const: column
          title: Sort Type
          default: column
      type: object
      title: AnnotationQueueNumUsersSort
    AnnotationQueueNumLogRecordsSort:
      properties:
        name:
          type: string
          const: num_log_records
          title: Name
          default: num_log_records
        ascending:
          type: boolean
          title: Ascending
          default: true
        sort_type:
          type: string
          const: column
          title: Sort Type
          default: column
      type: object
      title: AnnotationQueueNumLogRecordsSort
    AnnotationQueueNumTemplatesSort:
      properties:
        name:
          type: string
          const: num_templates
          title: Name
          default: num_templates
        ascending:
          type: boolean
          title: Ascending
          default: true
        sort_type:
          type: string
          const: column
          title: Sort Type
          default: column
      type: object
      title: AnnotationQueueNumTemplatesSort
    AnnotationQueueNumAnnotatorsSort:
      properties:
        name:
          type: string
          const: num_annotators
          title: Name
          default: num_annotators
        ascending:
          type: boolean
          title: Ascending
          default: true
        sort_type:
          type: string
          const: column
          title: Sort Type
          default: column
      type: object
      title: AnnotationQueueNumAnnotatorsSort
    AnnotationQueueOverallProgressSort:
      properties:
        name:
          type: string
          const: overall_progress
          title: Name
          default: overall_progress
        ascending:
          type: boolean
          title: Ascending
          default: true
        sort_type:
          type: string
          const: column
          title: Sort Type
          default: column
      type: object
      title: AnnotationQueueOverallProgressSort
    AnnotationQueueResponse:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
        permissions:
          items:
            $ref: '#/components/schemas/Permission'
          type: array
          title: Permissions
          default: []
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        created_by_user:
          anyOf:
            - $ref: '#/components/schemas/UserInfo'
            - type: 'null'
        num_log_records:
          type: integer
          title: Num Log Records
          default: 0
        num_annotators:
          type: integer
          title: Num Annotators
          default: 0
        num_users:
          type: integer
          title: Num Users
          default: 0
        num_templates:
          type: integer
          title: Num Templates
          default: 0
        num_logs_annotated:
          anyOf:
            - additionalProperties:
                type: integer
              propertyNames:
                format: uuid4
              type: object
            - type: 'null'
          title: Num Logs Annotated
        progress:
          anyOf:
            - additionalProperties:
                type: number
              propertyNames:
                format: uuid4
              type: object
            - type: 'null'
          title: Progress
        overall_progress:
          anyOf:
            - type: number
            - type: 'null'
          title: Overall Progress
        templates:
          items:
            $ref: '#/components/schemas/AnnotationTemplateDB'
          type: array
          title: Templates
      type: object
      required:
        - id
        - name
        - description
        - created_at
        - updated_at
        - created_by_user
      title: AnnotationQueueResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    Permission:
      properties:
        action:
          anyOf:
            - $ref: '#/components/schemas/UserAction'
            - $ref: '#/components/schemas/GroupAction'
            - $ref: '#/components/schemas/GroupMemberAction'
            - $ref: '#/components/schemas/ProjectAction'
            - $ref: '#/components/schemas/ScorerAction'
            - $ref: '#/components/schemas/RegisteredScorerAction'
            - $ref: '#/components/schemas/ApiKeyAction'
            - $ref: '#/components/schemas/GeneratedScorerAction'
            - $ref: '#/components/schemas/FineTunedScorerAction'
            - $ref: '#/components/schemas/DatasetAction'
            - $ref: '#/components/schemas/IntegrationAction'
            - $ref: '#/components/schemas/OrganizationAction'
            - $ref: '#/components/schemas/AnnotationQueueAction'
            - $ref: '#/components/schemas/ControlResourceAction'
          title: Action
        allowed:
          type: boolean
          title: Allowed
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
      type: object
      required:
        - action
        - allowed
      title: Permission
    UserInfo:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
        email:
          type: string
          title: Email
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
      type: object
      required:
        - id
        - email
      title: UserInfo
      description: A user's basic information, used for display purposes.
    AnnotationTemplateDB:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        include_explanation:
          type: boolean
          title: Include Explanation
        criteria:
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
          title: Criteria
        constraints:
          oneOf:
            - $ref: >-
                #/components/schemas/api__schemas__annotation__LikeDislikeConstraints
            - $ref: '#/components/schemas/api__schemas__annotation__StarConstraints'
            - $ref: '#/components/schemas/api__schemas__annotation__ScoreConstraints'
            - $ref: '#/components/schemas/api__schemas__annotation__TagsConstraints'
            - $ref: '#/components/schemas/api__schemas__annotation__TextConstraints'
            - $ref: '#/components/schemas/api__schemas__annotation__ChoiceConstraints'
            - $ref: '#/components/schemas/TreeChoiceDBConstraints'
          title: Constraints
          discriminator:
            propertyName: annotation_type
            mapping:
              choice:
                $ref: >-
                  #/components/schemas/api__schemas__annotation__ChoiceConstraints
              like_dislike:
                $ref: >-
                  #/components/schemas/api__schemas__annotation__LikeDislikeConstraints
              score:
                $ref: >-
                  #/components/schemas/api__schemas__annotation__ScoreConstraints
              star:
                $ref: '#/components/schemas/api__schemas__annotation__StarConstraints'
              tags:
                $ref: '#/components/schemas/api__schemas__annotation__TagsConstraints'
              text:
                $ref: '#/components/schemas/api__schemas__annotation__TextConstraints'
              tree_choice:
                $ref: '#/components/schemas/TreeChoiceDBConstraints'
        id:
          type: string
          format: uuid4
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        created_by:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Created By
        position:
          type: integer
          title: Position
        usage_count:
          type: integer
          title: Usage Count
          description: Number of annotation ratings using the template.
      type: object
      required:
        - name
        - include_explanation
        - constraints
        - id
        - created_at
        - created_by
        - position
        - usage_count
      title: AnnotationTemplateDB
    UserAction:
      type: string
      enum:
        - update
        - delete
        - read_api_keys
        - change_role_to_admin
        - change_role_to_manager
        - change_role_to_user
        - change_role_to_read_only
      title: UserAction
    GroupAction:
      type: string
      enum:
        - update
        - list_members
        - join
        - request_to_join
      title: GroupAction
    GroupMemberAction:
      type: string
      enum:
        - update_role
        - delete
      title: GroupMemberAction
    ProjectAction:
      type: string
      enum:
        - update
        - delete
        - rename
        - share
        - create_run
        - delete_run
        - rename_run
        - move_run
        - export_data
        - configure_human_feedback
        - record_human_feedback
        - log_data
        - toggle_metric
        - edit_alert
        - create_stage
        - edit_stage
        - configure_crown_logic
        - delete_data
        - set_metric
        - edit_run_tags
        - dismiss_alert
        - edit_slice
        - edit_edit
        - update_control_bindings
        - use_control_runtime
      title: ProjectAction
    ScorerAction:
      type: string
      enum:
        - update
        - delete
        - share
        - export
        - autotune_apply
      title: ScorerAction
    RegisteredScorerAction:
      type: string
      enum:
        - update
        - delete
      title: RegisteredScorerAction
    ApiKeyAction:
      type: string
      enum:
        - update
        - delete
      title: ApiKeyAction
    GeneratedScorerAction:
      type: string
      enum:
        - update
        - delete
      title: GeneratedScorerAction
    FineTunedScorerAction:
      type: string
      enum:
        - update
        - delete
      title: FineTunedScorerAction
    DatasetAction:
      type: string
      enum:
        - update
        - delete
        - share
        - export
        - rename
      title: DatasetAction
    IntegrationAction:
      type: string
      enum:
        - update
        - delete
        - share
        - read_secrets
      title: IntegrationAction
    OrganizationAction:
      type: string
      enum:
        - rename
        - delete
        - delete_log_data
        - read_settings
        - update_settings
        - read_cost_settings
      title: OrganizationAction
    AnnotationQueueAction:
      type: string
      enum:
        - update
        - delete
        - share
        - record_annotation
      title: AnnotationQueueAction
    ControlResourceAction:
      type: string
      enum:
        - create
        - read
        - update
        - delete
      title: ControlResourceAction
      description: Actions on Agent Control's org-scoped ``control`` resource.
    api__schemas__annotation__LikeDislikeConstraints:
      properties:
        annotation_type:
          type: string
          const: like_dislike
          title: Annotation Type
      type: object
      required:
        - annotation_type
      title: LikeDislikeConstraints
    api__schemas__annotation__StarConstraints:
      properties:
        annotation_type:
          type: string
          const: star
          title: Annotation Type
      type: object
      required:
        - annotation_type
      title: StarConstraints
    api__schemas__annotation__ScoreConstraints:
      properties:
        annotation_type:
          type: string
          const: score
          title: Annotation Type
        min:
          type: integer
          minimum: 0
          title: Min
        max:
          type: integer
          minimum: 0
          title: Max
      type: object
      required:
        - annotation_type
        - min
        - max
      title: ScoreConstraints
    api__schemas__annotation__TagsConstraints:
      properties:
        annotation_type:
          type: string
          const: tags
          title: Annotation Type
        tags:
          items:
            type: string
            maxLength: 255
            minLength: 1
          type: array
          title: Tags
        allow_other:
          type: boolean
          title: Allow Other
          default: false
      type: object
      required:
        - annotation_type
        - tags
      title: TagsConstraints
    api__schemas__annotation__TextConstraints:
      properties:
        annotation_type:
          type: string
          const: text
          title: Annotation Type
      type: object
      required:
        - annotation_type
      title: TextConstraints
    api__schemas__annotation__ChoiceConstraints:
      properties:
        annotation_type:
          type: string
          const: choice
          title: Annotation Type
        choices:
          items:
            type: string
            maxLength: 255
            minLength: 1
          type: array
          title: Choices
        allow_other:
          type: boolean
          title: Allow Other
          default: false
      type: object
      required:
        - annotation_type
        - choices
      title: ChoiceConstraints
    TreeChoiceDBConstraints:
      properties:
        annotation_type:
          type: string
          const: tree_choice
          title: Annotation Type
        choices_tree:
          items:
            $ref: >-
              #/components/schemas/api__schemas__annotation__TreeChoiceNode-Output
          type: array
          maxItems: 50
          title: Choices Tree
        choices_tree_yaml:
          type: string
          maxLength: 10000
          minLength: 1
          title: Choices Tree Yaml
      type: object
      required:
        - annotation_type
        - choices_tree
        - choices_tree_yaml
      title: TreeChoiceDBConstraints
    api__schemas__annotation__TreeChoiceNode-Output:
      properties:
        label:
          type: string
          maxLength: 255
          minLength: 1
          title: Label
        id:
          type: string
          maxLength: 255
          minLength: 1
          title: Id
        children:
          items:
            $ref: >-
              #/components/schemas/api__schemas__annotation__TreeChoiceNode-Output
          type: array
          maxItems: 50
          title: Children
      type: object
      required:
        - label
        - id
      title: TreeChoiceNode
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Splunk-AO-API-Key
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: https://api.galileo.ai/login

````