Langfuse AnnotationQueues API

The AnnotationQueues API from Langfuse — 5 operation(s) for annotationqueues.

OpenAPI Specification

langfuse-annotationqueues-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: langfuse AnnotationQueues API
  version: ''
  description: '## Authentication


    Authenticate with the API using [Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication), get API keys in the project settings:


    - username: Langfuse Public Key

    - password: Langfuse Secret Key


    ## Exports


    - OpenAPI spec: https://cloud.langfuse.com/generated/api/openapi.yml'
tags:
- name: AnnotationQueues
paths:
  /api/public/annotation-queues:
    get:
      description: Get all annotation queues
      operationId: annotationQueues_listQueues
      tags:
      - AnnotationQueues
      parameters:
      - name: page
        in: query
        description: page number, starts at 1
        required: false
        schema:
          type: integer
          nullable: true
      - name: limit
        in: query
        description: limit of items per page
        required: false
        schema:
          type: integer
          nullable: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAnnotationQueues'
        '400':
          description: ''
          content:
            application/json:
              schema: {}
        '401':
          description: ''
          content:
            application/json:
              schema: {}
        '403':
          description: ''
          content:
            application/json:
              schema: {}
        '404':
          description: ''
          content:
            application/json:
              schema: {}
        '405':
          description: ''
          content:
            application/json:
              schema: {}
      security:
      - BasicAuth: []
    post:
      description: Create an annotation queue
      operationId: annotationQueues_createQueue
      tags:
      - AnnotationQueues
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnotationQueue'
        '400':
          description: ''
          content:
            application/json:
              schema: {}
        '401':
          description: ''
          content:
            application/json:
              schema: {}
        '403':
          description: ''
          content:
            application/json:
              schema: {}
        '404':
          description: ''
          content:
            application/json:
              schema: {}
        '405':
          description: ''
          content:
            application/json:
              schema: {}
      security:
      - BasicAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAnnotationQueueRequest'
  /api/public/annotation-queues/{queueId}:
    get:
      description: Get an annotation queue by ID
      operationId: annotationQueues_getQueue
      tags:
      - AnnotationQueues
      parameters:
      - name: queueId
        in: path
        description: The unique identifier of the annotation queue
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnotationQueue'
        '400':
          description: ''
          content:
            application/json:
              schema: {}
        '401':
          description: ''
          content:
            application/json:
              schema: {}
        '403':
          description: ''
          content:
            application/json:
              schema: {}
        '404':
          description: ''
          content:
            application/json:
              schema: {}
        '405':
          description: ''
          content:
            application/json:
              schema: {}
      security:
      - BasicAuth: []
  /api/public/annotation-queues/{queueId}/items:
    get:
      description: Get items for a specific annotation queue
      operationId: annotationQueues_listQueueItems
      tags:
      - AnnotationQueues
      parameters:
      - name: queueId
        in: path
        description: The unique identifier of the annotation queue
        required: true
        schema:
          type: string
      - name: status
        in: query
        description: Filter by status
        required: false
        schema:
          $ref: '#/components/schemas/AnnotationQueueStatus'
          nullable: true
      - name: page
        in: query
        description: page number, starts at 1
        required: false
        schema:
          type: integer
          nullable: true
      - name: limit
        in: query
        description: limit of items per page
        required: false
        schema:
          type: integer
          nullable: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAnnotationQueueItems'
        '400':
          description: ''
          content:
            application/json:
              schema: {}
        '401':
          description: ''
          content:
            application/json:
              schema: {}
        '403':
          description: ''
          content:
            application/json:
              schema: {}
        '404':
          description: ''
          content:
            application/json:
              schema: {}
        '405':
          description: ''
          content:
            application/json:
              schema: {}
      security:
      - BasicAuth: []
    post:
      description: Add an item to an annotation queue
      operationId: annotationQueues_createQueueItem
      tags:
      - AnnotationQueues
      parameters:
      - name: queueId
        in: path
        description: The unique identifier of the annotation queue
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnotationQueueItem'
        '400':
          description: ''
          content:
            application/json:
              schema: {}
        '401':
          description: ''
          content:
            application/json:
              schema: {}
        '403':
          description: ''
          content:
            application/json:
              schema: {}
        '404':
          description: ''
          content:
            application/json:
              schema: {}
        '405':
          description: ''
          content:
            application/json:
              schema: {}
      security:
      - BasicAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAnnotationQueueItemRequest'
  /api/public/annotation-queues/{queueId}/items/{itemId}:
    get:
      description: Get a specific item from an annotation queue
      operationId: annotationQueues_getQueueItem
      tags:
      - AnnotationQueues
      parameters:
      - name: queueId
        in: path
        description: The unique identifier of the annotation queue
        required: true
        schema:
          type: string
      - name: itemId
        in: path
        description: The unique identifier of the annotation queue item
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnotationQueueItem'
        '400':
          description: ''
          content:
            application/json:
              schema: {}
        '401':
          description: ''
          content:
            application/json:
              schema: {}
        '403':
          description: ''
          content:
            application/json:
              schema: {}
        '404':
          description: ''
          content:
            application/json:
              schema: {}
        '405':
          description: ''
          content:
            application/json:
              schema: {}
      security:
      - BasicAuth: []
    patch:
      description: Update an annotation queue item
      operationId: annotationQueues_updateQueueItem
      tags:
      - AnnotationQueues
      parameters:
      - name: queueId
        in: path
        description: The unique identifier of the annotation queue
        required: true
        schema:
          type: string
      - name: itemId
        in: path
        description: The unique identifier of the annotation queue item
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnnotationQueueItem'
        '400':
          description: ''
          content:
            application/json:
              schema: {}
        '401':
          description: ''
          content:
            application/json:
              schema: {}
        '403':
          description: ''
          content:
            application/json:
              schema: {}
        '404':
          description: ''
          content:
            application/json:
              schema: {}
        '405':
          description: ''
          content:
            application/json:
              schema: {}
      security:
      - BasicAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAnnotationQueueItemRequest'
    delete:
      description: Remove an item from an annotation queue
      operationId: annotationQueues_deleteQueueItem
      tags:
      - AnnotationQueues
      parameters:
      - name: queueId
        in: path
        description: The unique identifier of the annotation queue
        required: true
        schema:
          type: string
      - name: itemId
        in: path
        description: The unique identifier of the annotation queue item
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteAnnotationQueueItemResponse'
        '400':
          description: ''
          content:
            application/json:
              schema: {}
        '401':
          description: ''
          content:
            application/json:
              schema: {}
        '403':
          description: ''
          content:
            application/json:
              schema: {}
        '404':
          description: ''
          content:
            application/json:
              schema: {}
        '405':
          description: ''
          content:
            application/json:
              schema: {}
      security:
      - BasicAuth: []
  /api/public/annotation-queues/{queueId}/assignments:
    post:
      description: Create an assignment for a user to an annotation queue
      operationId: annotationQueues_createQueueAssignment
      tags:
      - AnnotationQueues
      parameters:
      - name: queueId
        in: path
        description: The unique identifier of the annotation queue
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAnnotationQueueAssignmentResponse'
        '400':
          description: ''
          content:
            application/json:
              schema: {}
        '401':
          description: ''
          content:
            application/json:
              schema: {}
        '403':
          description: ''
          content:
            application/json:
              schema: {}
        '404':
          description: ''
          content:
            application/json:
              schema: {}
        '405':
          description: ''
          content:
            application/json:
              schema: {}
      security:
      - BasicAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnnotationQueueAssignmentRequest'
    delete:
      description: Delete an assignment for a user to an annotation queue
      operationId: annotationQueues_deleteQueueAssignment
      tags:
      - AnnotationQueues
      parameters:
      - name: queueId
        in: path
        description: The unique identifier of the annotation queue
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteAnnotationQueueAssignmentResponse'
        '400':
          description: ''
          content:
            application/json:
              schema: {}
        '401':
          description: ''
          content:
            application/json:
              schema: {}
        '403':
          description: ''
          content:
            application/json:
              schema: {}
        '404':
          description: ''
          content:
            application/json:
              schema: {}
        '405':
          description: ''
          content:
            application/json:
              schema: {}
      security:
      - BasicAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnnotationQueueAssignmentRequest'
components:
  schemas:
    AnnotationQueueAssignmentRequest:
      title: AnnotationQueueAssignmentRequest
      type: object
      properties:
        userId:
          type: string
      required:
      - userId
    AnnotationQueueStatus:
      title: AnnotationQueueStatus
      type: string
      enum:
      - PENDING
      - COMPLETED
    utilsMetaResponse:
      title: utilsMetaResponse
      type: object
      properties:
        page:
          type: integer
          description: current page number
        limit:
          type: integer
          description: number of items per page
        totalItems:
          type: integer
          description: number of total items given the current filters/selection (if any)
        totalPages:
          type: integer
          description: number of total pages given the current limit
      required:
      - page
      - limit
      - totalItems
      - totalPages
    DeleteAnnotationQueueAssignmentResponse:
      title: DeleteAnnotationQueueAssignmentResponse
      type: object
      properties:
        success:
          type: boolean
      required:
      - success
    CreateAnnotationQueueRequest:
      title: CreateAnnotationQueueRequest
      type: object
      properties:
        name:
          type: string
        description:
          type: string
          nullable: true
        scoreConfigIds:
          type: array
          items:
            type: string
      required:
      - name
      - scoreConfigIds
    PaginatedAnnotationQueues:
      title: PaginatedAnnotationQueues
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/AnnotationQueue'
        meta:
          $ref: '#/components/schemas/utilsMetaResponse'
      required:
      - data
      - meta
    CreateAnnotationQueueItemRequest:
      title: CreateAnnotationQueueItemRequest
      type: object
      properties:
        objectId:
          type: string
        objectType:
          $ref: '#/components/schemas/AnnotationQueueObjectType'
        status:
          $ref: '#/components/schemas/AnnotationQueueStatus'
          nullable: true
          description: Defaults to PENDING for new queue items
      required:
      - objectId
      - objectType
    AnnotationQueueObjectType:
      title: AnnotationQueueObjectType
      type: string
      enum:
      - TRACE
      - OBSERVATION
      - SESSION
    CreateAnnotationQueueAssignmentResponse:
      title: CreateAnnotationQueueAssignmentResponse
      type: object
      properties:
        userId:
          type: string
        queueId:
          type: string
        projectId:
          type: string
      required:
      - userId
      - queueId
      - projectId
    DeleteAnnotationQueueItemResponse:
      title: DeleteAnnotationQueueItemResponse
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
      required:
      - success
      - message
    UpdateAnnotationQueueItemRequest:
      title: UpdateAnnotationQueueItemRequest
      type: object
      properties:
        status:
          $ref: '#/components/schemas/AnnotationQueueStatus'
          nullable: true
    AnnotationQueue:
      title: AnnotationQueue
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        scoreConfigIds:
          type: array
          items:
            type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
      - id
      - name
      - scoreConfigIds
      - createdAt
      - updatedAt
    PaginatedAnnotationQueueItems:
      title: PaginatedAnnotationQueueItems
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/AnnotationQueueItem'
        meta:
          $ref: '#/components/schemas/utilsMetaResponse'
      required:
      - data
      - meta
    AnnotationQueueItem:
      title: AnnotationQueueItem
      type: object
      properties:
        id:
          type: string
        queueId:
          type: string
        objectId:
          type: string
        objectType:
          $ref: '#/components/schemas/AnnotationQueueObjectType'
        status:
          $ref: '#/components/schemas/AnnotationQueueStatus'
        completedAt:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
      - id
      - queueId
      - objectId
      - objectType
      - status
      - createdAt
      - updatedAt
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic