openapi: 3.0.0
info:
  title: Sync Workspace API
  version: 1.0.0
  license:
    name: Commercial
    url: https://syncdocs.ai/terms
  description: >2-
     # Sync Workspace API
    Workspace-specific services for content management, project organization,
    and file processing.

    ## Workspace Services

    The Workspace APIs allow access to the resources contained within Workspaces
    and Dataspaces. Although Workspaces and Dataspaces are distinct, Dataspaces
    have no compute of their own, so operations on Dataspace resources must
    always be performed *through* a chosen workspace.

    Workspaces are bundled, fully-managed computational services used to: -
    Upload, process, and manage content files - Search and retrieve content with
    advanced filtering - Query content using AI with library citations and web
    search integration - Run AI workflows on the content - Organize content into
    projects according to business workflows - Generate file derivatives
    (images, thumbnails) and extract metadata - Handle content indexing with
    automated categorization

    ## Content Processing

    When files are uploaded, they undergo asynchronous processing which may
    include: - Virus scanning and security validation - File format conversion
    and derivative generation (TIFF, JPEG thumbnails) - Automated metadata
    extraction using AI - Content categorization and indexing according to
    dataspace ontology

    Processing status can be tracked using the Workflow Execution API.

    ## Projects vs Content Organization

    - **Content**: Individual files with metadata, organized by categories
    defined in the dataspace ontology - **Projects**: Business workflow
    containers that group disparate content items according to business rules
    (e.g., application packets, case files)

    ## Authentication

    All endpoints require authentication using a bearer token. 
servers:
  - url: https://{workspaceId}.syncdocs.ai/api
    description: Production - Workspace Services
    variables:
      workspaceId:
        default: your-workspace
        description: Your workspace identifier
  - url: /api
    description: Development server
tags:
  - name: Content
    description: >-
      Content management operations. Handle file uploads, processing, metadata
      extraction, and content retrieval with advanced filtering capabilities.
  - name: Projects
    description: >-
      Project management operations. Projects group content items according to
      business workflows and processes.
  - name: Workflow Executions
    description: >-
      Workflow execution monitoring operations. Track the status and progress of
      AI workflow executions on content.
  - name: Batch Workflow Executions
    description: >-
      Batch workflow execution operations. Execute workflows on multiple content
      items based on filters across multiple dataspaces.
  - name: Task Executions
    description: >-
      Task execution monitoring operations. Track individual task executions
      within workflows and retrieve their outputs.
  - name: Task Execution Outputs
    description: >-
      Task execution output retrieval operations. Access the results and outputs
      generated by completed task executions.
  - name: Registered Workflows
    description: >-
      Registered workflow operations. Access workflows cached from sync-apis for
      fast lookup during workflow execution.
  - name: Query Logs
    description: >-
      Query logging and retrieval operations. Track and analyze API operations
      performed on resources with detailed audit trails.
  - name: Content Upload Sessions
    description: >-
      Content upload session management operations. Handle reliable file uploads
      through chunked upload sessions with progress tracking.
security:
  - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas:
    CreateProject:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          description: Name of the project
          example: My Research Project
        description:
          type: string
          minLength: 1
          description: Description of the project
          example: A comprehensive research project on data analysis
        dataspaceId:
          type: string
          pattern: ^sds-[a-z0-9]{8}$
          description: Short dataspace ID with sds- prefix
          example: sds-abc12345
      required:
        - name
        - description
        - dataspaceId
    UpdateProject:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          description: Name of the project
          example: Updated Project Name
        description:
          type: string
          minLength: 1
          description: Description of the project
          example: Updated project description
    Project:
      type: object
      properties:
        projectId:
          type: string
          format: uuid
          example: 123e4567-e89b-12d3-a456-426614174000
        name:
          type: string
          example: My Research Project
        description:
          type: string
          example: A comprehensive research project on data analysis
        dataspaceId:
          type: string
          pattern: ^sds-[a-z0-9]{8}$
          description: Short dataspace ID with sds- prefix
          example: sds-abc12345
        createdAt:
          type: string
          format: date-time
          example: '2024-01-15T10:30:00Z'
        updatedAt:
          type: string
          nullable: true
          format: date-time
          example: '2024-01-15T14:30:00Z'
      required:
        - projectId
        - name
        - description
        - dataspaceId
        - createdAt
        - updatedAt
    CreateContentMultipart:
      type: object
      properties:
        categoryId:
          type: string
          format: uuid
          description: UUID of the category
          example: 123e4567-e89b-12d3-a456-426614174001
        metadata:
          type: object
          properties: {}
          description: Optional metadata for the content item
          example:
            author: John Doe
            category: research
        fileFormat:
          type: string
          description: Format of the file
          example: application/pdf
        fileName:
          type: string
          description: Name of the file
          example: document.pdf
      required:
        - fileFormat
    UpdateContent:
      type: object
      properties:
        categoryId:
          type: string
          format: uuid
          description: UUID of the category
          example: 123e4567-e89b-12d3-a456-426614174001
        metadata:
          type: object
          properties: {}
          description: Optional metadata for the content item
          example:
            status: updated
            version: 2
        inferenceTaskExecutions:
          type: object
          additionalProperties:
            type: string
            format: uuid
          description: >-
            Optional record of inference task executions that modified this
            content
          example:
            categoryId: 789e0123-e89b-12d3-a456-426614174002
    QueryContentBody:
      type: object
      properties:
        query:
          type: string
          minLength: 1
          description: The question or query to ask about the filtered content
          example: What are the main themes discussed in these documents?
        agentId:
          type: string
          description: >-
            Optional agent ID to use for the query. If provided, the agent's
            instructions will be used as the system prompt.
          example: 01234567-89ab-cdef-0123-456789abcdef
        context:
          type: object
          properties:
            contentFilters:
              type: object
              properties:
                contentId:
                  anyOf:
                    - type: string
                      description: Simple string match value
                      example: example-value
                    - type: number
                      description: Simple number match value
                      example: 42
                    - type: boolean
                      description: Simple boolean match value
                      example: true
                    - type: object
                      properties:
                        eq:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                          description: Equals - exact match
                          example: exact-value
                        ne:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                          description: Not equals - exclude exact match
                          example: exclude-value
                        gt:
                          anyOf:
                            - type: number
                            - type: string
                          description: Greater than - for numbers and dates
                          example: 100
                        gte:
                          anyOf:
                            - type: number
                            - type: string
                          description: Greater than or equal - for numbers and dates
                          example: 100
                        lt:
                          anyOf:
                            - type: number
                            - type: string
                          description: Less than - for numbers and dates
                          example: 50
                        lte:
                          anyOf:
                            - type: number
                            - type: string
                          description: Less than or equal - for numbers and dates
                          example: 50
                        between:
                          type: array
                          items:
                            anyOf:
                              - type: number
                              - type: string
                          minItems: 2
                          maxItems: 2
                          description: >-
                            Between two values [min, max] - for numbers and
                            dates
                          example:
                            - 10
                            - 100
                        in:
                          type: array
                          items:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                          description: Value is in the provided array
                          example:
                            - value1
                            - value2
                            - value3
                        nin:
                          type: array
                          items:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                          description: Value is not in the provided array
                          example:
                            - exclude1
                            - exclude2
                        startsWith:
                          type: string
                          description: String starts with the provided value
                          example: prefix
                        inference_task_executions:
                          type: object
                          additionalProperties:
                            type: string
                            format: uuid
                          default: {}
                        endsWith:
                          type: string
                          description: String ends with the provided value
                          example: suffix
                        contains:
                          type: string
                          description: String contains the provided value
                          example: substring
                        exists:
                          type: boolean
                          description: Field exists (true) or does not exist (false)
                          example: true
                        isNull:
                          type: boolean
                          description: Field is null (true) or is not null (false)
                          example: false
                        isNotNull:
                          type: boolean
                          description: Field is not null (true) or is null (false)
                          example: true
                      additionalProperties: false
                      description: Advanced filter operators for complex queries
                  description: Filter by content ID
                categoryId:
                  anyOf:
                    - type: string
                      description: Simple string match value
                      example: example-value
                    - type: number
                      description: Simple number match value
                      example: 42
                    - type: boolean
                      description: Simple boolean match value
                      example: true
                    - type: object
                      properties:
                        eq:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                          description: Equals - exact match
                          example: exact-value
                        ne:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                          description: Not equals - exclude exact match
                          example: exclude-value
                        gt:
                          anyOf:
                            - type: number
                            - type: string
                          description: Greater than - for numbers and dates
                          example: 100
                        gte:
                          anyOf:
                            - type: number
                            - type: string
                          description: Greater than or equal - for numbers and dates
                          example: 100
                        lt:
                          anyOf:
                            - type: number
                            - type: string
                          description: Less than - for numbers and dates
                          example: 50
                        lte:
                          anyOf:
                            - type: number
                            - type: string
                          description: Less than or equal - for numbers and dates
                          example: 50
                        between:
                          type: array
                          items:
                            anyOf:
                              - type: number
                              - type: string
                          minItems: 2
                          maxItems: 2
                          description: >-
                            Between two values [min, max] - for numbers and
                            dates
                          example:
                            - 10
                            - 100
                        in:
                          type: array
                          items:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                          description: Value is in the provided array
                          example:
                            - value1
                            - value2
                            - value3
                        nin:
                          type: array
                          items:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                          description: Value is not in the provided array
                          example:
                            - exclude1
                            - exclude2
                        startsWith:
                          type: string
                          description: String starts with the provided value
                          example: prefix
                        inference_task_executions:
                          type: object
                          additionalProperties:
                            type: string
                            format: uuid
                          default: {}
                        endsWith:
                          type: string
                          description: String ends with the provided value
                          example: suffix
                        contains:
                          type: string
                          description: String contains the provided value
                          example: substring
                        exists:
                          type: boolean
                          description: Field exists (true) or does not exist (false)
                          example: true
                        isNull:
                          type: boolean
                          description: Field is null (true) or is not null (false)
                          example: false
                        isNotNull:
                          type: boolean
                          description: Field is not null (true) or is null (false)
                          example: true
                      additionalProperties: false
                      description: Advanced filter operators for complex queries
                  description: Filter by category ID
                fileName:
                  anyOf:
                    - type: string
                      description: Simple string match value
                      example: example-value
                    - type: number
                      description: Simple number match value
                      example: 42
                    - type: boolean
                      description: Simple boolean match value
                      example: true
                    - type: object
                      properties:
                        eq:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                          description: Equals - exact match
                          example: exact-value
                        ne:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                          description: Not equals - exclude exact match
                          example: exclude-value
                        gt:
                          anyOf:
                            - type: number
                            - type: string
                          description: Greater than - for numbers and dates
                          example: 100
                        gte:
                          anyOf:
                            - type: number
                            - type: string
                          description: Greater than or equal - for numbers and dates
                          example: 100
                        lt:
                          anyOf:
                            - type: number
                            - type: string
                          description: Less than - for numbers and dates
                          example: 50
                        lte:
                          anyOf:
                            - type: number
                            - type: string
                          description: Less than or equal - for numbers and dates
                          example: 50
                        between:
                          type: array
                          items:
                            anyOf:
                              - type: number
                              - type: string
                          minItems: 2
                          maxItems: 2
                          description: >-
                            Between two values [min, max] - for numbers and
                            dates
                          example:
                            - 10
                            - 100
                        in:
                          type: array
                          items:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                          description: Value is in the provided array
                          example:
                            - value1
                            - value2
                            - value3
                        nin:
                          type: array
                          items:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                          description: Value is not in the provided array
                          example:
                            - exclude1
                            - exclude2
                        startsWith:
                          type: string
                          description: String starts with the provided value
                          example: prefix
                        inference_task_executions:
                          type: object
                          additionalProperties:
                            type: string
                            format: uuid
                          default: {}
                        endsWith:
                          type: string
                          description: String ends with the provided value
                          example: suffix
                        contains:
                          type: string
                          description: String contains the provided value
                          example: substring
                        exists:
                          type: boolean
                          description: Field exists (true) or does not exist (false)
                          example: true
                        isNull:
                          type: boolean
                          description: Field is null (true) or is not null (false)
                          example: false
                        isNotNull:
                          type: boolean
                          description: Field is not null (true) or is null (false)
                          example: true
                      additionalProperties: false
                      description: Advanced filter operators for complex queries
                  description: Filter by file name
                fileFormat:
                  anyOf:
                    - type: string
                      description: Simple string match value
                      example: example-value
                    - type: number
                      description: Simple number match value
                      example: 42
                    - type: boolean
                      description: Simple boolean match value
                      example: true
                    - type: object
                      properties:
                        eq:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                          description: Equals - exact match
                          example: exact-value
                        ne:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                          description: Not equals - exclude exact match
                          example: exclude-value
                        gt:
                          anyOf:
                            - type: number
                            - type: string
                          description: Greater than - for numbers and dates
                          example: 100
                        gte:
                          anyOf:
                            - type: number
                            - type: string
                          description: Greater than or equal - for numbers and dates
                          example: 100
                        lt:
                          anyOf:
                            - type: number
                            - type: string
                          description: Less than - for numbers and dates
                          example: 50
                        lte:
                          anyOf:
                            - type: number
                            - type: string
                          description: Less than or equal - for numbers and dates
                          example: 50
                        between:
                          type: array
                          items:
                            anyOf:
                              - type: number
                              - type: string
                          minItems: 2
                          maxItems: 2
                          description: >-
                            Between two values [min, max] - for numbers and
                            dates
                          example:
                            - 10
                            - 100
                        in:
                          type: array
                          items:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                          description: Value is in the provided array
                          example:
                            - value1
                            - value2
                            - value3
                        nin:
                          type: array
                          items:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                          description: Value is not in the provided array
                          example:
                            - exclude1
                            - exclude2
                        startsWith:
                          type: string
                          description: String starts with the provided value
                          example: prefix
                        inference_task_executions:
                          type: object
                          additionalProperties:
                            type: string
                            format: uuid
                          default: {}
                        endsWith:
                          type: string
                          description: String ends with the provided value
                          example: suffix
                        contains:
                          type: string
                          description: String contains the provided value
                          example: substring
                        exists:
                          type: boolean
                          description: Field exists (true) or does not exist (false)
                          example: true
                        isNull:
                          type: boolean
                          description: Field is null (true) or is not null (false)
                          example: false
                        isNotNull:
                          type: boolean
                          description: Field is not null (true) or is null (false)
                          example: true
                      additionalProperties: false
                      description: Advanced filter operators for complex queries
                  description: Filter by file format/MIME type
                createdAt:
                  anyOf:
                    - type: string
                      description: Simple string match value
                      example: example-value
                    - type: number
                      description: Simple number match value
                      example: 42
                    - type: boolean
                      description: Simple boolean match value
                      example: true
                    - type: object
                      properties:
                        eq:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                          description: Equals - exact match
                          example: exact-value
                        ne:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                          description: Not equals - exclude exact match
                          example: exclude-value
                        gt:
                          anyOf:
                            - type: number
                            - type: string
                          description: Greater than - for numbers and dates
                          example: 100
                        gte:
                          anyOf:
                            - type: number
                            - type: string
                          description: Greater than or equal - for numbers and dates
                          example: 100
                        lt:
                          anyOf:
                            - type: number
                            - type: string
                          description: Less than - for numbers and dates
                          example: 50
                        lte:
                          anyOf:
                            - type: number
                            - type: string
                          description: Less than or equal - for numbers and dates
                          example: 50
                        between:
                          type: array
                          items:
                            anyOf:
                              - type: number
                              - type: string
                          minItems: 2
                          maxItems: 2
                          description: >-
                            Between two values [min, max] - for numbers and
                            dates
                          example:
                            - 10
                            - 100
                        in:
                          type: array
                          items:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                          description: Value is in the provided array
                          example:
                            - value1
                            - value2
                            - value3
                        nin:
                          type: array
                          items:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                          description: Value is not in the provided array
                          example:
                            - exclude1
                            - exclude2
                        startsWith:
                          type: string
                          description: String starts with the provided value
                          example: prefix
                        inference_task_executions:
                          type: object
                          additionalProperties:
                            type: string
                            format: uuid
                          default: {}
                        endsWith:
                          type: string
                          description: String ends with the provided value
                          example: suffix
                        contains:
                          type: string
                          description: String contains the provided value
                          example: substring
                        exists:
                          type: boolean
                          description: Field exists (true) or does not exist (false)
                          example: true
                        isNull:
                          type: boolean
                          description: Field is null (true) or is not null (false)
                          example: false
                        isNotNull:
                          type: boolean
                          description: Field is not null (true) or is null (false)
                          example: true
                      additionalProperties: false
                      description: Advanced filter operators for complex queries
                  description: Filter by creation date
                updatedAt:
                  anyOf:
                    - type: string
                      description: Simple string match value
                      example: example-value
                    - type: number
                      description: Simple number match value
                      example: 42
                    - type: boolean
                      description: Simple boolean match value
                      example: true
                    - type: object
                      properties:
                        eq:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                          description: Equals - exact match
                          example: exact-value
                        ne:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                          description: Not equals - exclude exact match
                          example: exclude-value
                        gt:
                          anyOf:
                            - type: number
                            - type: string
                          description: Greater than - for numbers and dates
                          example: 100
                        gte:
                          anyOf:
                            - type: number
                            - type: string
                          description: Greater than or equal - for numbers and dates
                          example: 100
                        lt:
                          anyOf:
                            - type: number
                            - type: string
                          description: Less than - for numbers and dates
                          example: 50
                        lte:
                          anyOf:
                            - type: number
                            - type: string
                          description: Less than or equal - for numbers and dates
                          example: 50
                        between:
                          type: array
                          items:
                            anyOf:
                              - type: number
                              - type: string
                          minItems: 2
                          maxItems: 2
                          description: >-
                            Between two values [min, max] - for numbers and
                            dates
                          example:
                            - 10
                            - 100
                        in:
                          type: array
                          items:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                          description: Value is in the provided array
                          example:
                            - value1
                            - value2
                            - value3
                        nin:
                          type: array
                          items:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                          description: Value is not in the provided array
                          example:
                            - exclude1
                            - exclude2
                        startsWith:
                          type: string
                          description: String starts with the provided value
                          example: prefix
                        inference_task_executions:
                          type: object
                          additionalProperties:
                            type: string
                            format: uuid
                          default: {}
                        endsWith:
                          type: string
                          description: String ends with the provided value
                          example: suffix
                        contains:
                          type: string
                          description: String contains the provided value
                          example: substring
                        exists:
                          type: boolean
                          description: Field exists (true) or does not exist (false)
                          example: true
                        isNull:
                          type: boolean
                          description: Field is null (true) or is not null (false)
                          example: false
                        isNotNull:
                          type: boolean
                          description: Field is not null (true) or is null (false)
                          example: true
                      additionalProperties: false
                      description: Advanced filter operators for complex queries
                  description: Filter by last update date
                metadata:
                  type: object
                  additionalProperties:
                    anyOf:
                      - type: string
                        description: Simple string match value
                        example: example-value
                      - type: number
                        description: Simple number match value
                        example: 42
                      - type: boolean
                        description: Simple boolean match value
                        example: true
                      - type: object
                        properties:
                          eq:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                            description: Equals - exact match
                            example: exact-value
                          ne:
                            anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                            description: Not equals - exclude exact match
                            example: exclude-value
                          gt:
                            anyOf:
                              - type: number
                              - type: string
                            description: Greater than - for numbers and dates
                            example: 100
                          gte:
                            anyOf:
                              - type: number
                              - type: string
                            description: Greater than or equal - for numbers and dates
                            example: 100
                          lt:
                            anyOf:
                              - type: number
                              - type: string
                            description: Less than - for numbers and dates
                            example: 50
                          lte:
                            anyOf:
                              - type: number
                              - type: string
                            description: Less than or equal - for numbers and dates
                            example: 50
                          between:
                            type: array
                            items:
                              anyOf:
                                - type: number
                                - type: string
                            minItems: 2
                            maxItems: 2
                            description: >-
                              Between two values [min, max] - for numbers and
                              dates
                            example:
                              - 10
                              - 100
                          in:
                            type: array
                            items:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                            description: Value is in the provided array
                            example:
                              - value1
                              - value2
                              - value3
                          nin:
                            type: array
                            items:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                            description: Value is not in the provided array
                            example:
                              - exclude1
                              - exclude2
                          startsWith:
                            type: string
                            description: String starts with the provided value
                            example: prefix
                          inference_task_executions:
                            type: object
                            additionalProperties:
                              type: string
                              format: uuid
                            default: {}
                          endsWith:
                            type: string
                            description: String ends with the provided value
                            example: suffix
                          contains:
                            type: string
                            description: String contains the provided value
                            example: substring
                          exists:
                            type: boolean
                            description: Field exists (true) or does not exist (false)
                            example: true
                          isNull:
                            type: boolean
                            description: Field is null (true) or is not null (false)
                            example: false
                          isNotNull:
                            type: boolean
                            description: Field is not null (true) or is null (false)
                            example: true
                        additionalProperties: false
                        description: Advanced filter operators for complex queries
                    description: >-
                      Filter value - can be a simple value for exact match or an
                      object with operators
                  description: >-
                    Filter by metadata fields - key-value pairs where values can
                    use advanced operators
              additionalProperties: false
              description: Filters to apply when selecting content for querying
            libraries:
              type: array
              items:
                type: string
                format: uuid
              description: Array of library IDs to include in search context
              example:
                - 01234567-89ab-cdef-0123-456789abcdef
            includeWebSearchResults:
              type: boolean
              default: false
              description: >-
                Whether to include web search results in addition to local
                document search. Default is false.
              example: false
          additionalProperties: false
          description: Optional context configuration for content sources and filters
      required:
        - query
      additionalProperties: false
      description: Request body for querying content using AI assistant with vector store
    QueryContentResponse:
      type: object
      properties:
        query:
          type: string
          description: The original query that was asked
          example: What are the main themes discussed in these documents?
        response:
          type: string
          description: The AI assistant's response to the query
          example: >-
            Based on the documents in your collection, the main themes
            include...
        analyzedDocumentCount:
          type: integer
          description: Number of documents that were analyzed and available for querying
          example: 15
        citedContent:
          type: array
          items:
            type: object
            properties:
              contentId:
                type: string
                format: uuid
                description: Unique identifier for the content item
                example: 123e4567-e89b-12d3-a456-426614174000
              dataspaceId:
                type: string
                pattern: ^sds-[a-z0-9]{8}$
                description: Short dataspace ID with sds- prefix
                example: sds-abc12345
              fileName:
                type: string
                description: Name of the uploaded file
                example: document.pdf
              fileFormat:
                type: string
                description: MIME type of the file
                example: application/pdf
              createdAt:
                type: string
                format: date-time
                description: ISO timestamp when the content was created
                example: '2024-01-15T10:30:00Z'
              updatedAt:
                type: string
                format: date-time
                description: ISO timestamp when the content was last updated
                example: '2024-01-15T14:30:00Z'
              categoryId:
                type: string
                nullable: true
                format: uuid
                description: UUID of the category this content belongs to
                example: 123e4567-e89b-12d3-a456-426614174001
              metadata:
                type: object
                nullable: true
                properties: {}
                description: Optional metadata for the content item
                example:
                  author: John Doe
                  version: 1
                  published: true
              inferenceTaskExecutions:
                type: object
                nullable: true
                additionalProperties:
                  type: string
                  format: uuid
                description: >-
                  Record of inference task executions that modified this
                  content, mapping inference type to task execution ID
                example:
                  categoryId: 789e0123-e89b-12d3-a456-426614174002
              versionString:
                type: string
                nullable: true
                description: Version identifier based on category and unique metadata
                example: research_v2_final
              fileUrl:
                type: string
                nullable: true
                format: uri
                description: Public URL to access the file
                example: >-
                  https://api.example.com/files/sds-abc12345/content/123e4567-e89b-12d3-a456-426614174000/document.pdf
              fileSize:
                type: integer
                nullable: true
                description: Size of the file in bytes
                example: 2048576
              taskExecutionDetails:
                type: object
                nullable: true
                additionalProperties:
                  type: object
                  properties: {}
                description: Detailed information about task executions
                example:
                  categoryId:
                    status: completed
                    confidence: high
              relatedVersions:
                type: array
                nullable: true
                items:
                  type: object
                  properties: {}
                description: Related content items with the same version string
                example: []
              citationNumber:
                type: integer
                minimum: 1
                description: Citation number used in the AI response (e.g., [1], [2], etc.)
                example: 1
            required:
              - contentId
              - dataspaceId
              - fileName
              - fileFormat
              - createdAt
              - updatedAt
          description: >-
            Array of content items that were cited in the AI response, including
            citation numbers
          example: []
        webSearchResults:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
                description: Title of the web search result
                example: Sample Article Title
              url:
                type: string
                format: uri
                description: URL of the web search result
                example: https://example.com/article
              snippet:
                type: string
                description: Snippet/preview text from the web search result
                example: This article discusses...
              relevanceScore:
                type: number
                minimum: 0
                maximum: 1
                description: Relevance score from 0 to 1
                example: 0.85
              citationNumber:
                type: integer
                minimum: 1
                description: >-
                  Citation number used in the AI response (e.g., [100], [101],
                  etc.)
                example: 100
            required:
              - title
              - url
              - snippet
              - relevanceScore
            description: Web search result from external search providers
          description: Array of web search results that were included in the AI response
          example: []
        citedLibraryPages:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: Unique identifier for the source file
                example: 01234567-89ab-cdef-0123-456789abcdef
              libraryId:
                type: string
                format: uuid
                description: ID of the library this page belongs to
                example: 01234567-89ab-cdef-0123-456789abcdef
              url:
                type: string
                format: uri
                description: URL of the original web page
                example: https://example.com/page
              title:
                type: string
                description: Title of the web page
                example: Example Page Title
              domain:
                type: string
                description: Domain of the web page
                example: example.com
              contentType:
                type: string
                description: Content type of the page
                example: text/html
              scrapedAt:
                type: string
                description: When the page was scraped
                example: '2024-01-01T00:00:00Z'
              relevanceScore:
                type: number
                minimum: 0
                maximum: 1
                description: Relevance score for this citation
                example: 0.92
              citationNumber:
                type: integer
                minimum: 1
                description: Citation number used in the AI response
                example: 2
            required:
              - id
              - libraryId
              - url
            description: Library page citation information
          description: Array of library pages that were cited in the AI response
          example: []
      required:
        - query
        - response
        - analyzedDocumentCount
        - citedContent
        - webSearchResults
        - citedLibraryPages
      description: Response from the AI assistant query
    QueryContext:
      type: object
      properties:
        contentFilters:
          type: object
          properties:
            contentId:
              anyOf:
                - type: string
                  description: Simple string match value
                  example: example-value
                - type: number
                  description: Simple number match value
                  example: 42
                - type: boolean
                  description: Simple boolean match value
                  example: true
                - type: object
                  properties:
                    eq:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                      description: Equals - exact match
                      example: exact-value
                    ne:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                      description: Not equals - exclude exact match
                      example: exclude-value
                    gt:
                      anyOf:
                        - type: number
                        - type: string
                      description: Greater than - for numbers and dates
                      example: 100
                    gte:
                      anyOf:
                        - type: number
                        - type: string
                      description: Greater than or equal - for numbers and dates
                      example: 100
                    lt:
                      anyOf:
                        - type: number
                        - type: string
                      description: Less than - for numbers and dates
                      example: 50
                    lte:
                      anyOf:
                        - type: number
                        - type: string
                      description: Less than or equal - for numbers and dates
                      example: 50
                    between:
                      type: array
                      items:
                        anyOf:
                          - type: number
                          - type: string
                      minItems: 2
                      maxItems: 2
                      description: Between two values [min, max] - for numbers and dates
                      example:
                        - 10
                        - 100
                    in:
                      type: array
                      items:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                      description: Value is in the provided array
                      example:
                        - value1
                        - value2
                        - value3
                    nin:
                      type: array
                      items:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                      description: Value is not in the provided array
                      example:
                        - exclude1
                        - exclude2
                    startsWith:
                      type: string
                      description: String starts with the provided value
                      example: prefix
                    inference_task_executions:
                      type: object
                      additionalProperties:
                        type: string
                        format: uuid
                      default: {}
                    endsWith:
                      type: string
                      description: String ends with the provided value
                      example: suffix
                    contains:
                      type: string
                      description: String contains the provided value
                      example: substring
                    exists:
                      type: boolean
                      description: Field exists (true) or does not exist (false)
                      example: true
                    isNull:
                      type: boolean
                      description: Field is null (true) or is not null (false)
                      example: false
                    isNotNull:
                      type: boolean
                      description: Field is not null (true) or is null (false)
                      example: true
                  additionalProperties: false
                  description: Advanced filter operators for complex queries
              description: Filter by content ID
            categoryId:
              anyOf:
                - type: string
                  description: Simple string match value
                  example: example-value
                - type: number
                  description: Simple number match value
                  example: 42
                - type: boolean
                  description: Simple boolean match value
                  example: true
                - type: object
                  properties:
                    eq:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                      description: Equals - exact match
                      example: exact-value
                    ne:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                      description: Not equals - exclude exact match
                      example: exclude-value
                    gt:
                      anyOf:
                        - type: number
                        - type: string
                      description: Greater than - for numbers and dates
                      example: 100
                    gte:
                      anyOf:
                        - type: number
                        - type: string
                      description: Greater than or equal - for numbers and dates
                      example: 100
                    lt:
                      anyOf:
                        - type: number
                        - type: string
                      description: Less than - for numbers and dates
                      example: 50
                    lte:
                      anyOf:
                        - type: number
                        - type: string
                      description: Less than or equal - for numbers and dates
                      example: 50
                    between:
                      type: array
                      items:
                        anyOf:
                          - type: number
                          - type: string
                      minItems: 2
                      maxItems: 2
                      description: Between two values [min, max] - for numbers and dates
                      example:
                        - 10
                        - 100
                    in:
                      type: array
                      items:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                      description: Value is in the provided array
                      example:
                        - value1
                        - value2
                        - value3
                    nin:
                      type: array
                      items:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                      description: Value is not in the provided array
                      example:
                        - exclude1
                        - exclude2
                    startsWith:
                      type: string
                      description: String starts with the provided value
                      example: prefix
                    inference_task_executions:
                      type: object
                      additionalProperties:
                        type: string
                        format: uuid
                      default: {}
                    endsWith:
                      type: string
                      description: String ends with the provided value
                      example: suffix
                    contains:
                      type: string
                      description: String contains the provided value
                      example: substring
                    exists:
                      type: boolean
                      description: Field exists (true) or does not exist (false)
                      example: true
                    isNull:
                      type: boolean
                      description: Field is null (true) or is not null (false)
                      example: false
                    isNotNull:
                      type: boolean
                      description: Field is not null (true) or is null (false)
                      example: true
                  additionalProperties: false
                  description: Advanced filter operators for complex queries
              description: Filter by category ID
            fileName:
              anyOf:
                - type: string
                  description: Simple string match value
                  example: example-value
                - type: number
                  description: Simple number match value
                  example: 42
                - type: boolean
                  description: Simple boolean match value
                  example: true
                - type: object
                  properties:
                    eq:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                      description: Equals - exact match
                      example: exact-value
                    ne:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                      description: Not equals - exclude exact match
                      example: exclude-value
                    gt:
                      anyOf:
                        - type: number
                        - type: string
                      description: Greater than - for numbers and dates
                      example: 100
                    gte:
                      anyOf:
                        - type: number
                        - type: string
                      description: Greater than or equal - for numbers and dates
                      example: 100
                    lt:
                      anyOf:
                        - type: number
                        - type: string
                      description: Less than - for numbers and dates
                      example: 50
                    lte:
                      anyOf:
                        - type: number
                        - type: string
                      description: Less than or equal - for numbers and dates
                      example: 50
                    between:
                      type: array
                      items:
                        anyOf:
                          - type: number
                          - type: string
                      minItems: 2
                      maxItems: 2
                      description: Between two values [min, max] - for numbers and dates
                      example:
                        - 10
                        - 100
                    in:
                      type: array
                      items:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                      description: Value is in the provided array
                      example:
                        - value1
                        - value2
                        - value3
                    nin:
                      type: array
                      items:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                      description: Value is not in the provided array
                      example:
                        - exclude1
                        - exclude2
                    startsWith:
                      type: string
                      description: String starts with the provided value
                      example: prefix
                    inference_task_executions:
                      type: object
                      additionalProperties:
                        type: string
                        format: uuid
                      default: {}
                    endsWith:
                      type: string
                      description: String ends with the provided value
                      example: suffix
                    contains:
                      type: string
                      description: String contains the provided value
                      example: substring
                    exists:
                      type: boolean
                      description: Field exists (true) or does not exist (false)
                      example: true
                    isNull:
                      type: boolean
                      description: Field is null (true) or is not null (false)
                      example: false
                    isNotNull:
                      type: boolean
                      description: Field is not null (true) or is null (false)
                      example: true
                  additionalProperties: false
                  description: Advanced filter operators for complex queries
              description: Filter by file name
            fileFormat:
              anyOf:
                - type: string
                  description: Simple string match value
                  example: example-value
                - type: number
                  description: Simple number match value
                  example: 42
                - type: boolean
                  description: Simple boolean match value
                  example: true
                - type: object
                  properties:
                    eq:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                      description: Equals - exact match
                      example: exact-value
                    ne:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                      description: Not equals - exclude exact match
                      example: exclude-value
                    gt:
                      anyOf:
                        - type: number
                        - type: string
                      description: Greater than - for numbers and dates
                      example: 100
                    gte:
                      anyOf:
                        - type: number
                        - type: string
                      description: Greater than or equal - for numbers and dates
                      example: 100
                    lt:
                      anyOf:
                        - type: number
                        - type: string
                      description: Less than - for numbers and dates
                      example: 50
                    lte:
                      anyOf:
                        - type: number
                        - type: string
                      description: Less than or equal - for numbers and dates
                      example: 50
                    between:
                      type: array
                      items:
                        anyOf:
                          - type: number
                          - type: string
                      minItems: 2
                      maxItems: 2
                      description: Between two values [min, max] - for numbers and dates
                      example:
                        - 10
                        - 100
                    in:
                      type: array
                      items:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                      description: Value is in the provided array
                      example:
                        - value1
                        - value2
                        - value3
                    nin:
                      type: array
                      items:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                      description: Value is not in the provided array
                      example:
                        - exclude1
                        - exclude2
                    startsWith:
                      type: string
                      description: String starts with the provided value
                      example: prefix
                    inference_task_executions:
                      type: object
                      additionalProperties:
                        type: string
                        format: uuid
                      default: {}
                    endsWith:
                      type: string
                      description: String ends with the provided value
                      example: suffix
                    contains:
                      type: string
                      description: String contains the provided value
                      example: substring
                    exists:
                      type: boolean
                      description: Field exists (true) or does not exist (false)
                      example: true
                    isNull:
                      type: boolean
                      description: Field is null (true) or is not null (false)
                      example: false
                    isNotNull:
                      type: boolean
                      description: Field is not null (true) or is null (false)
                      example: true
                  additionalProperties: false
                  description: Advanced filter operators for complex queries
              description: Filter by file format/MIME type
            createdAt:
              anyOf:
                - type: string
                  description: Simple string match value
                  example: example-value
                - type: number
                  description: Simple number match value
                  example: 42
                - type: boolean
                  description: Simple boolean match value
                  example: true
                - type: object
                  properties:
                    eq:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                      description: Equals - exact match
                      example: exact-value
                    ne:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                      description: Not equals - exclude exact match
                      example: exclude-value
                    gt:
                      anyOf:
                        - type: number
                        - type: string
                      description: Greater than - for numbers and dates
                      example: 100
                    gte:
                      anyOf:
                        - type: number
                        - type: string
                      description: Greater than or equal - for numbers and dates
                      example: 100
                    lt:
                      anyOf:
                        - type: number
                        - type: string
                      description: Less than - for numbers and dates
                      example: 50
                    lte:
                      anyOf:
                        - type: number
                        - type: string
                      description: Less than or equal - for numbers and dates
                      example: 50
                    between:
                      type: array
                      items:
                        anyOf:
                          - type: number
                          - type: string
                      minItems: 2
                      maxItems: 2
                      description: Between two values [min, max] - for numbers and dates
                      example:
                        - 10
                        - 100
                    in:
                      type: array
                      items:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                      description: Value is in the provided array
                      example:
                        - value1
                        - value2
                        - value3
                    nin:
                      type: array
                      items:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                      description: Value is not in the provided array
                      example:
                        - exclude1
                        - exclude2
                    startsWith:
                      type: string
                      description: String starts with the provided value
                      example: prefix
                    inference_task_executions:
                      type: object
                      additionalProperties:
                        type: string
                        format: uuid
                      default: {}
                    endsWith:
                      type: string
                      description: String ends with the provided value
                      example: suffix
                    contains:
                      type: string
                      description: String contains the provided value
                      example: substring
                    exists:
                      type: boolean
                      description: Field exists (true) or does not exist (false)
                      example: true
                    isNull:
                      type: boolean
                      description: Field is null (true) or is not null (false)
                      example: false
                    isNotNull:
                      type: boolean
                      description: Field is not null (true) or is null (false)
                      example: true
                  additionalProperties: false
                  description: Advanced filter operators for complex queries
              description: Filter by creation date
            updatedAt:
              anyOf:
                - type: string
                  description: Simple string match value
                  example: example-value
                - type: number
                  description: Simple number match value
                  example: 42
                - type: boolean
                  description: Simple boolean match value
                  example: true
                - type: object
                  properties:
                    eq:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                      description: Equals - exact match
                      example: exact-value
                    ne:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                      description: Not equals - exclude exact match
                      example: exclude-value
                    gt:
                      anyOf:
                        - type: number
                        - type: string
                      description: Greater than - for numbers and dates
                      example: 100
                    gte:
                      anyOf:
                        - type: number
                        - type: string
                      description: Greater than or equal - for numbers and dates
                      example: 100
                    lt:
                      anyOf:
                        - type: number
                        - type: string
                      description: Less than - for numbers and dates
                      example: 50
                    lte:
                      anyOf:
                        - type: number
                        - type: string
                      description: Less than or equal - for numbers and dates
                      example: 50
                    between:
                      type: array
                      items:
                        anyOf:
                          - type: number
                          - type: string
                      minItems: 2
                      maxItems: 2
                      description: Between two values [min, max] - for numbers and dates
                      example:
                        - 10
                        - 100
                    in:
                      type: array
                      items:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                      description: Value is in the provided array
                      example:
                        - value1
                        - value2
                        - value3
                    nin:
                      type: array
                      items:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                      description: Value is not in the provided array
                      example:
                        - exclude1
                        - exclude2
                    startsWith:
                      type: string
                      description: String starts with the provided value
                      example: prefix
                    inference_task_executions:
                      type: object
                      additionalProperties:
                        type: string
                        format: uuid
                      default: {}
                    endsWith:
                      type: string
                      description: String ends with the provided value
                      example: suffix
                    contains:
                      type: string
                      description: String contains the provided value
                      example: substring
                    exists:
                      type: boolean
                      description: Field exists (true) or does not exist (false)
                      example: true
                    isNull:
                      type: boolean
                      description: Field is null (true) or is not null (false)
                      example: false
                    isNotNull:
                      type: boolean
                      description: Field is not null (true) or is null (false)
                      example: true
                  additionalProperties: false
                  description: Advanced filter operators for complex queries
              description: Filter by last update date
            metadata:
              type: object
              additionalProperties:
                anyOf:
                  - type: string
                    description: Simple string match value
                    example: example-value
                  - type: number
                    description: Simple number match value
                    example: 42
                  - type: boolean
                    description: Simple boolean match value
                    example: true
                  - type: object
                    properties:
                      eq:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                        description: Equals - exact match
                        example: exact-value
                      ne:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                        description: Not equals - exclude exact match
                        example: exclude-value
                      gt:
                        anyOf:
                          - type: number
                          - type: string
                        description: Greater than - for numbers and dates
                        example: 100
                      gte:
                        anyOf:
                          - type: number
                          - type: string
                        description: Greater than or equal - for numbers and dates
                        example: 100
                      lt:
                        anyOf:
                          - type: number
                          - type: string
                        description: Less than - for numbers and dates
                        example: 50
                      lte:
                        anyOf:
                          - type: number
                          - type: string
                        description: Less than or equal - for numbers and dates
                        example: 50
                      between:
                        type: array
                        items:
                          anyOf:
                            - type: number
                            - type: string
                        minItems: 2
                        maxItems: 2
                        description: Between two values [min, max] - for numbers and dates
                        example:
                          - 10
                          - 100
                      in:
                        type: array
                        items:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                        description: Value is in the provided array
                        example:
                          - value1
                          - value2
                          - value3
                      nin:
                        type: array
                        items:
                          anyOf:
                            - type: string
                            - type: number
                            - type: boolean
                        description: Value is not in the provided array
                        example:
                          - exclude1
                          - exclude2
                      startsWith:
                        type: string
                        description: String starts with the provided value
                        example: prefix
                      inference_task_executions:
                        type: object
                        additionalProperties:
                          type: string
                          format: uuid
                        default: {}
                      endsWith:
                        type: string
                        description: String ends with the provided value
                        example: suffix
                      contains:
                        type: string
                        description: String contains the provided value
                        example: substring
                      exists:
                        type: boolean
                        description: Field exists (true) or does not exist (false)
                        example: true
                      isNull:
                        type: boolean
                        description: Field is null (true) or is not null (false)
                        example: false
                      isNotNull:
                        type: boolean
                        description: Field is not null (true) or is null (false)
                        example: true
                    additionalProperties: false
                    description: Advanced filter operators for complex queries
                description: >-
                  Filter value - can be a simple value for exact match or an
                  object with operators
              description: >-
                Filter by metadata fields - key-value pairs where values can use
                advanced operators
          additionalProperties: false
          description: Filters to apply when selecting content for querying
        libraries:
          type: array
          items:
            type: string
            format: uuid
          description: Array of library IDs to include in search context
          example:
            - 01234567-89ab-cdef-0123-456789abcdef
        includeWebSearchResults:
          type: boolean
          default: false
          description: >-
            Whether to include web search results in addition to local document
            search. Default is false.
          example: false
      additionalProperties: false
      description: Context configuration for content sources and search options
    LibraryPage:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the source file
          example: 01234567-89ab-cdef-0123-456789abcdef
        libraryId:
          type: string
          format: uuid
          description: ID of the library this page belongs to
          example: 01234567-89ab-cdef-0123-456789abcdef
        url:
          type: string
          format: uri
          description: URL of the original web page
          example: https://example.com/page
        title:
          type: string
          description: Title of the web page
          example: Example Page Title
        domain:
          type: string
          description: Domain of the web page
          example: example.com
        contentType:
          type: string
          description: Content type of the page
          example: text/html
        scrapedAt:
          type: string
          description: When the page was scraped
          example: '2024-01-01T00:00:00Z'
        relevanceScore:
          type: number
          minimum: 0
          maximum: 1
          description: Relevance score for this citation
          example: 0.92
        citationNumber:
          type: integer
          minimum: 1
          description: Citation number used in the AI response
          example: 2
      required:
        - id
        - libraryId
        - url
      description: Library page citation information
    WebSearchResult:
      type: object
      properties:
        title:
          type: string
          description: Title of the web search result
          example: Sample Article Title
        url:
          type: string
          format: uri
          description: URL of the web search result
          example: https://example.com/article
        snippet:
          type: string
          description: Snippet/preview text from the web search result
          example: This article discusses...
        relevanceScore:
          type: number
          minimum: 0
          maximum: 1
          description: Relevance score from 0 to 1
          example: 0.85
        citationNumber:
          type: integer
          minimum: 1
          description: Citation number used in the AI response (e.g., [100], [101], etc.)
          example: 100
      required:
        - title
        - url
        - snippet
        - relevanceScore
      description: Web search result from external search providers
    ContentFilters:
      type: object
      properties:
        contentId:
          anyOf:
            - type: string
              description: Simple string match value
              example: example-value
            - type: number
              description: Simple number match value
              example: 42
            - type: boolean
              description: Simple boolean match value
              example: true
            - type: object
              properties:
                eq:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                  description: Equals - exact match
                  example: exact-value
                ne:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                  description: Not equals - exclude exact match
                  example: exclude-value
                gt:
                  anyOf:
                    - type: number
                    - type: string
                  description: Greater than - for numbers and dates
                  example: 100
                gte:
                  anyOf:
                    - type: number
                    - type: string
                  description: Greater than or equal - for numbers and dates
                  example: 100
                lt:
                  anyOf:
                    - type: number
                    - type: string
                  description: Less than - for numbers and dates
                  example: 50
                lte:
                  anyOf:
                    - type: number
                    - type: string
                  description: Less than or equal - for numbers and dates
                  example: 50
                between:
                  type: array
                  items:
                    anyOf:
                      - type: number
                      - type: string
                  minItems: 2
                  maxItems: 2
                  description: Between two values [min, max] - for numbers and dates
                  example:
                    - 10
                    - 100
                in:
                  type: array
                  items:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                  description: Value is in the provided array
                  example:
                    - value1
                    - value2
                    - value3
                nin:
                  type: array
                  items:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                  description: Value is not in the provided array
                  example:
                    - exclude1
                    - exclude2
                startsWith:
                  type: string
                  description: String starts with the provided value
                  example: prefix
                inference_task_executions:
                  type: object
                  additionalProperties:
                    type: string
                    format: uuid
                  default: {}
                endsWith:
                  type: string
                  description: String ends with the provided value
                  example: suffix
                contains:
                  type: string
                  description: String contains the provided value
                  example: substring
                exists:
                  type: boolean
                  description: Field exists (true) or does not exist (false)
                  example: true
                isNull:
                  type: boolean
                  description: Field is null (true) or is not null (false)
                  example: false
                isNotNull:
                  type: boolean
                  description: Field is not null (true) or is null (false)
                  example: true
              additionalProperties: false
              description: Advanced filter operators for complex queries
          description: Filter by content ID
        categoryId:
          anyOf:
            - type: string
              description: Simple string match value
              example: example-value
            - type: number
              description: Simple number match value
              example: 42
            - type: boolean
              description: Simple boolean match value
              example: true
            - type: object
              properties:
                eq:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                  description: Equals - exact match
                  example: exact-value
                ne:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                  description: Not equals - exclude exact match
                  example: exclude-value
                gt:
                  anyOf:
                    - type: number
                    - type: string
                  description: Greater than - for numbers and dates
                  example: 100
                gte:
                  anyOf:
                    - type: number
                    - type: string
                  description: Greater than or equal - for numbers and dates
                  example: 100
                lt:
                  anyOf:
                    - type: number
                    - type: string
                  description: Less than - for numbers and dates
                  example: 50
                lte:
                  anyOf:
                    - type: number
                    - type: string
                  description: Less than or equal - for numbers and dates
                  example: 50
                between:
                  type: array
                  items:
                    anyOf:
                      - type: number
                      - type: string
                  minItems: 2
                  maxItems: 2
                  description: Between two values [min, max] - for numbers and dates
                  example:
                    - 10
                    - 100
                in:
                  type: array
                  items:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                  description: Value is in the provided array
                  example:
                    - value1
                    - value2
                    - value3
                nin:
                  type: array
                  items:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                  description: Value is not in the provided array
                  example:
                    - exclude1
                    - exclude2
                startsWith:
                  type: string
                  description: String starts with the provided value
                  example: prefix
                inference_task_executions:
                  type: object
                  additionalProperties:
                    type: string
                    format: uuid
                  default: {}
                endsWith:
                  type: string
                  description: String ends with the provided value
                  example: suffix
                contains:
                  type: string
                  description: String contains the provided value
                  example: substring
                exists:
                  type: boolean
                  description: Field exists (true) or does not exist (false)
                  example: true
                isNull:
                  type: boolean
                  description: Field is null (true) or is not null (false)
                  example: false
                isNotNull:
                  type: boolean
                  description: Field is not null (true) or is null (false)
                  example: true
              additionalProperties: false
              description: Advanced filter operators for complex queries
          description: Filter by category ID
        fileName:
          anyOf:
            - type: string
              description: Simple string match value
              example: example-value
            - type: number
              description: Simple number match value
              example: 42
            - type: boolean
              description: Simple boolean match value
              example: true
            - type: object
              properties:
                eq:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                  description: Equals - exact match
                  example: exact-value
                ne:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                  description: Not equals - exclude exact match
                  example: exclude-value
                gt:
                  anyOf:
                    - type: number
                    - type: string
                  description: Greater than - for numbers and dates
                  example: 100
                gte:
                  anyOf:
                    - type: number
                    - type: string
                  description: Greater than or equal - for numbers and dates
                  example: 100
                lt:
                  anyOf:
                    - type: number
                    - type: string
                  description: Less than - for numbers and dates
                  example: 50
                lte:
                  anyOf:
                    - type: number
                    - type: string
                  description: Less than or equal - for numbers and dates
                  example: 50
                between:
                  type: array
                  items:
                    anyOf:
                      - type: number
                      - type: string
                  minItems: 2
                  maxItems: 2
                  description: Between two values [min, max] - for numbers and dates
                  example:
                    - 10
                    - 100
                in:
                  type: array
                  items:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                  description: Value is in the provided array
                  example:
                    - value1
                    - value2
                    - value3
                nin:
                  type: array
                  items:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                  description: Value is not in the provided array
                  example:
                    - exclude1
                    - exclude2
                startsWith:
                  type: string
                  description: String starts with the provided value
                  example: prefix
                inference_task_executions:
                  type: object
                  additionalProperties:
                    type: string
                    format: uuid
                  default: {}
                endsWith:
                  type: string
                  description: String ends with the provided value
                  example: suffix
                contains:
                  type: string
                  description: String contains the provided value
                  example: substring
                exists:
                  type: boolean
                  description: Field exists (true) or does not exist (false)
                  example: true
                isNull:
                  type: boolean
                  description: Field is null (true) or is not null (false)
                  example: false
                isNotNull:
                  type: boolean
                  description: Field is not null (true) or is null (false)
                  example: true
              additionalProperties: false
              description: Advanced filter operators for complex queries
          description: Filter by file name
        fileFormat:
          anyOf:
            - type: string
              description: Simple string match value
              example: example-value
            - type: number
              description: Simple number match value
              example: 42
            - type: boolean
              description: Simple boolean match value
              example: true
            - type: object
              properties:
                eq:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                  description: Equals - exact match
                  example: exact-value
                ne:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                  description: Not equals - exclude exact match
                  example: exclude-value
                gt:
                  anyOf:
                    - type: number
                    - type: string
                  description: Greater than - for numbers and dates
                  example: 100
                gte:
                  anyOf:
                    - type: number
                    - type: string
                  description: Greater than or equal - for numbers and dates
                  example: 100
                lt:
                  anyOf:
                    - type: number
                    - type: string
                  description: Less than - for numbers and dates
                  example: 50
                lte:
                  anyOf:
                    - type: number
                    - type: string
                  description: Less than or equal - for numbers and dates
                  example: 50
                between:
                  type: array
                  items:
                    anyOf:
                      - type: number
                      - type: string
                  minItems: 2
                  maxItems: 2
                  description: Between two values [min, max] - for numbers and dates
                  example:
                    - 10
                    - 100
                in:
                  type: array
                  items:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                  description: Value is in the provided array
                  example:
                    - value1
                    - value2
                    - value3
                nin:
                  type: array
                  items:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                  description: Value is not in the provided array
                  example:
                    - exclude1
                    - exclude2
                startsWith:
                  type: string
                  description: String starts with the provided value
                  example: prefix
                inference_task_executions:
                  type: object
                  additionalProperties:
                    type: string
                    format: uuid
                  default: {}
                endsWith:
                  type: string
                  description: String ends with the provided value
                  example: suffix
                contains:
                  type: string
                  description: String contains the provided value
                  example: substring
                exists:
                  type: boolean
                  description: Field exists (true) or does not exist (false)
                  example: true
                isNull:
                  type: boolean
                  description: Field is null (true) or is not null (false)
                  example: false
                isNotNull:
                  type: boolean
                  description: Field is not null (true) or is null (false)
                  example: true
              additionalProperties: false
              description: Advanced filter operators for complex queries
          description: Filter by file format/MIME type
        createdAt:
          anyOf:
            - type: string
              description: Simple string match value
              example: example-value
            - type: number
              description: Simple number match value
              example: 42
            - type: boolean
              description: Simple boolean match value
              example: true
            - type: object
              properties:
                eq:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                  description: Equals - exact match
                  example: exact-value
                ne:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                  description: Not equals - exclude exact match
                  example: exclude-value
                gt:
                  anyOf:
                    - type: number
                    - type: string
                  description: Greater than - for numbers and dates
                  example: 100
                gte:
                  anyOf:
                    - type: number
                    - type: string
                  description: Greater than or equal - for numbers and dates
                  example: 100
                lt:
                  anyOf:
                    - type: number
                    - type: string
                  description: Less than - for numbers and dates
                  example: 50
                lte:
                  anyOf:
                    - type: number
                    - type: string
                  description: Less than or equal - for numbers and dates
                  example: 50
                between:
                  type: array
                  items:
                    anyOf:
                      - type: number
                      - type: string
                  minItems: 2
                  maxItems: 2
                  description: Between two values [min, max] - for numbers and dates
                  example:
                    - 10
                    - 100
                in:
                  type: array
                  items:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                  description: Value is in the provided array
                  example:
                    - value1
                    - value2
                    - value3
                nin:
                  type: array
                  items:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                  description: Value is not in the provided array
                  example:
                    - exclude1
                    - exclude2
                startsWith:
                  type: string
                  description: String starts with the provided value
                  example: prefix
                inference_task_executions:
                  type: object
                  additionalProperties:
                    type: string
                    format: uuid
                  default: {}
                endsWith:
                  type: string
                  description: String ends with the provided value
                  example: suffix
                contains:
                  type: string
                  description: String contains the provided value
                  example: substring
                exists:
                  type: boolean
                  description: Field exists (true) or does not exist (false)
                  example: true
                isNull:
                  type: boolean
                  description: Field is null (true) or is not null (false)
                  example: false
                isNotNull:
                  type: boolean
                  description: Field is not null (true) or is null (false)
                  example: true
              additionalProperties: false
              description: Advanced filter operators for complex queries
          description: Filter by creation date
        updatedAt:
          anyOf:
            - type: string
              description: Simple string match value
              example: example-value
            - type: number
              description: Simple number match value
              example: 42
            - type: boolean
              description: Simple boolean match value
              example: true
            - type: object
              properties:
                eq:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                  description: Equals - exact match
                  example: exact-value
                ne:
                  anyOf:
                    - type: string
                    - type: number
                    - type: boolean
                  description: Not equals - exclude exact match
                  example: exclude-value
                gt:
                  anyOf:
                    - type: number
                    - type: string
                  description: Greater than - for numbers and dates
                  example: 100
                gte:
                  anyOf:
                    - type: number
                    - type: string
                  description: Greater than or equal - for numbers and dates
                  example: 100
                lt:
                  anyOf:
                    - type: number
                    - type: string
                  description: Less than - for numbers and dates
                  example: 50
                lte:
                  anyOf:
                    - type: number
                    - type: string
                  description: Less than or equal - for numbers and dates
                  example: 50
                between:
                  type: array
                  items:
                    anyOf:
                      - type: number
                      - type: string
                  minItems: 2
                  maxItems: 2
                  description: Between two values [min, max] - for numbers and dates
                  example:
                    - 10
                    - 100
                in:
                  type: array
                  items:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                  description: Value is in the provided array
                  example:
                    - value1
                    - value2
                    - value3
                nin:
                  type: array
                  items:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                  description: Value is not in the provided array
                  example:
                    - exclude1
                    - exclude2
                startsWith:
                  type: string
                  description: String starts with the provided value
                  example: prefix
                inference_task_executions:
                  type: object
                  additionalProperties:
                    type: string
                    format: uuid
                  default: {}
                endsWith:
                  type: string
                  description: String ends with the provided value
                  example: suffix
                contains:
                  type: string
                  description: String contains the provided value
                  example: substring
                exists:
                  type: boolean
                  description: Field exists (true) or does not exist (false)
                  example: true
                isNull:
                  type: boolean
                  description: Field is null (true) or is not null (false)
                  example: false
                isNotNull:
                  type: boolean
                  description: Field is not null (true) or is null (false)
                  example: true
              additionalProperties: false
              description: Advanced filter operators for complex queries
          description: Filter by last update date
        metadata:
          type: object
          additionalProperties:
            anyOf:
              - type: string
                description: Simple string match value
                example: example-value
              - type: number
                description: Simple number match value
                example: 42
              - type: boolean
                description: Simple boolean match value
                example: true
              - type: object
                properties:
                  eq:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                    description: Equals - exact match
                    example: exact-value
                  ne:
                    anyOf:
                      - type: string
                      - type: number
                      - type: boolean
                    description: Not equals - exclude exact match
                    example: exclude-value
                  gt:
                    anyOf:
                      - type: number
                      - type: string
                    description: Greater than - for numbers and dates
                    example: 100
                  gte:
                    anyOf:
                      - type: number
                      - type: string
                    description: Greater than or equal - for numbers and dates
                    example: 100
                  lt:
                    anyOf:
                      - type: number
                      - type: string
                    description: Less than - for numbers and dates
                    example: 50
                  lte:
                    anyOf:
                      - type: number
                      - type: string
                    description: Less than or equal - for numbers and dates
                    example: 50
                  between:
                    type: array
                    items:
                      anyOf:
                        - type: number
                        - type: string
                    minItems: 2
                    maxItems: 2
                    description: Between two values [min, max] - for numbers and dates
                    example:
                      - 10
                      - 100
                  in:
                    type: array
                    items:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                    description: Value is in the provided array
                    example:
                      - value1
                      - value2
                      - value3
                  nin:
                    type: array
                    items:
                      anyOf:
                        - type: string
                        - type: number
                        - type: boolean
                    description: Value is not in the provided array
                    example:
                      - exclude1
                      - exclude2
                  startsWith:
                    type: string
                    description: String starts with the provided value
                    example: prefix
                  inference_task_executions:
                    type: object
                    additionalProperties:
                      type: string
                      format: uuid
                    default: {}
                  endsWith:
                    type: string
                    description: String ends with the provided value
                    example: suffix
                  contains:
                    type: string
                    description: String contains the provided value
                    example: substring
                  exists:
                    type: boolean
                    description: Field exists (true) or does not exist (false)
                    example: true
                  isNull:
                    type: boolean
                    description: Field is null (true) or is not null (false)
                    example: false
                  isNotNull:
                    type: boolean
                    description: Field is not null (true) or is null (false)
                    example: true
                additionalProperties: false
                description: Advanced filter operators for complex queries
            description: >-
              Filter value - can be a simple value for exact match or an object
              with operators
          description: >-
            Filter by metadata fields - key-value pairs where values can use
            advanced operators
      additionalProperties: false
    QueryLogId:
      type: string
      format: uuid
      description: Unique query log ID
      example: 01234567-89ab-cdef-0123-456789abcdef
    OperationType:
      type: string
      enum:
        - GET
        - OPEN
        - CREATE
        - UPDATE
        - ANALYZE
        - GET_MANY
        - OPEN_MANY
        - CREATE_MANY
        - UPDATE_MANY
        - ANALYZE_MANY
        - DELETE
      description: Type of operation performed
      example: CREATE
    OperationScope:
      type: string
      enum:
        - content
        - dataspace
      description: Scope of the operation - content or dataspace level
      example: content
    UserId:
      type: string
      description: ID of the user who performed the query
      example: scd-dev00001
    UserEmail:
      type: string
      format: email
      description: Email of the user who performed the query
      example: user@syncdocs.com
    ContentName:
      type: string
      description: Name of the content that was operated on
      example: Sidewalk Permit
    ContentId:
      type: string
      nullable: true
      format: uuid
      description: ID of the content operated on, null for LIST operations
      example: 98765432-1abc-def0-1234-56789abcdef0
    DataspaceId:
      type: string
      pattern: ^sds-[a-z0-9]{8}$
      description: Short dataspace ID with sds- prefix
      example: sds-dev00001
    OperationSource:
      type: string
      enum:
        - explicit
        - implicit
      description: Whether the operation was explicit or implicit
      example: explicit
    QueryData:
      type: object
      description: JSONB format information to reconstruct the API call
      additionalProperties: true
      example:
        method: POST
        path: /api/content/sds-dev00001
        params:
          dataspaceId: sds-dev00001
        query: {}
        body:
          categoryId: 12345678-90ab-cdef-1234-567890abcdef
          metadata:
            permitType: sidewalk
            applicantName: John Doe
          fileFormat: application/pdf
          fileName: sidewalk_permit_001.pdf
        headers:
          content-type: multipart/form-data
          user-agent: axios/1.6.0
        timestamp: '2025-06-10T20:28:42.113Z'
    ParentId:
      type: string
      nullable: true
      format: uuid
      description: ID of the parent query log, used for LIST/Inferred logging type
      example: 02345678-9abc-def0-1234-56789abcdef1
    QueriedAt:
      type: string
      format: date-time
      description: Timestamp of when the query was performed
      example: '2025-06-10T20:28:42.113Z'
    QueryLogResponse:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/QueryLogId'
        operationType:
          $ref: '#/components/schemas/OperationType'
        operationScope:
          $ref: '#/components/schemas/OperationScope'
        userId:
          $ref: '#/components/schemas/UserId'
        userEmail:
          $ref: '#/components/schemas/UserEmail'
        contentName:
          $ref: '#/components/schemas/ContentName'
        contentId:
          $ref: '#/components/schemas/ContentId'
        dataspaceId:
          $ref: '#/components/schemas/DataspaceId'
        operationSource:
          $ref: '#/components/schemas/OperationSource'
        query:
          $ref: '#/components/schemas/QueryData'
        parentId:
          $ref: '#/components/schemas/ParentId'
        queriedAt:
          $ref: '#/components/schemas/QueriedAt'
      required:
        - id
        - operationType
        - userId
        - contentId
        - dataspaceId
        - operationSource
        - query
        - parentId
        - queriedAt
      example:
        id: 01234567-89ab-cdef-0123-456789abcdef
        operationType: CREATE
        userId: scd-dev00001
        contentId: 98765432-1abc-def0-1234-56789abcdef0
        dataspaceId: sds-dev00001
        operationSource: explicit
        query:
          method: POST
          path: /api/content/sds-dev00001
          params:
            dataspaceId: sds-dev00001
          query: {}
          body:
            categoryId: 12345678-90ab-cdef-1234-567890abcdef
            metadata:
              permitType: sidewalk
              applicantName: John Doe
            fileFormat: application/pdf
            fileName: sidewalk_permit_001.pdf
          headers:
            content-type: multipart/form-data
            user-agent: axios/1.6.0
          timestamp: '2025-06-10T20:28:42.113Z'
        parentId: null
        queriedAt: '2025-06-10T20:28:42.113Z'
    QueryLogItemParams:
      type: string
      format: uuid
      description: The unique UUID of the query log to retrieve
      example: 01234567-89ab-cdef-0123-456789abcdef
    NextCursor:
      type: string
      description: Cursor for next page
      example: 03456789-abcd-ef01-2345-6789abcdef12
    TotalCount:
      type: integer
      description: Total number of records
      example: 54
    FetchQueryLogsResponse:
      type: object
      properties:
        queryLogs:
          type: array
          items:
            type: object
            properties:
              id:
                $ref: '#/components/schemas/QueryLogId'
              operationType:
                $ref: '#/components/schemas/OperationType'
              operationScope:
                $ref: '#/components/schemas/OperationScope'
              userId:
                $ref: '#/components/schemas/UserId'
              userEmail:
                $ref: '#/components/schemas/UserEmail'
              contentName:
                $ref: '#/components/schemas/ContentName'
              contentId:
                $ref: '#/components/schemas/ContentId'
              dataspaceId:
                $ref: '#/components/schemas/DataspaceId'
              operationSource:
                $ref: '#/components/schemas/OperationSource'
              query:
                $ref: '#/components/schemas/QueryData'
              parentId:
                $ref: '#/components/schemas/ParentId'
              queriedAt:
                $ref: '#/components/schemas/QueriedAt'
            required:
              - id
              - operationType
              - userId
              - contentId
              - dataspaceId
              - operationSource
              - query
              - parentId
              - queriedAt
          description: List of query log records
        nextCursor:
          $ref: '#/components/schemas/NextCursor'
        totalCount:
          $ref: '#/components/schemas/TotalCount'
      required:
        - queryLogs
        - totalCount
      example:
        queryLogs:
          - id: 01234567-89ab-cdef-0123-456789abcdef
            operationType: CREATE
            userId: scd-dev00001
            contentId: 98765432-1abc-def0-1234-56789abcdef0
            dataspaceId: sds-dev00001
            operationSource: explicit
            query:
              method: POST
              path: /api/content/sds-dev00001
              params:
                dataspaceId: sds-dev00001
              query: {}
              body:
                categoryId: 12345678-90ab-cdef-1234-567890abcdef
                metadata:
                  permitType: sidewalk
                  applicantName: John Doe
                fileFormat: application/pdf
                fileName: sidewalk_permit_001.pdf
              headers:
                content-type: multipart/form-data
                user-agent: axios/1.6.0
              timestamp: '2025-06-10T20:28:42.113Z'
            parentId: null
            queriedAt: '2025-06-10T20:28:42.113Z'
          - id: 02345678-9abc-def0-1234-56789abcdef1
            operationType: GET_MANY
            userId: scd-dev00001
            contentId: null
            dataspaceId: sds-dev00001
            operationSource: explicit
            query:
              method: POST
              path: /api/content/sds-dev00001/fetch
              params:
                dataspaceId: sds-dev00001
              query:
                pageSize: 50
              body:
                filters: {}
              headers:
                content-type: application/json
                user-agent: axios/1.6.0
              timestamp: '2025-06-10T20:28:42.428Z'
            parentId: null
            queriedAt: '2025-06-10T20:28:42.428Z'
        nextCursor: 03456789-abcd-ef01-2345-6789abcdef12
        totalCount: 54
    PageSize:
      type: integer
      minimum: 1
      maximum: 100
      description: Number of items per page
      example: 25
    Cursor:
      type: string
      description: Cursor for pagination
      example: 03456789-abcd-ef01-2345-6789abcdef12
    DateFrom:
      type: string
      format: date-time
      description: Filter by date range start
      example: '2025-06-10T00:00:00Z'
    DateTo:
      type: string
      format: date-time
      description: Filter by date range end
      example: '2025-06-10T23:59:59Z'
  parameters: {}
paths:
  /projects/{dataspaceId}:
    post:
      operationId: createProject
      tags:
        - Projects
      summary: Create a new project
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProject'
      responses:
        '201':
          description: Project created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '400':
          description: Invalid input data
        '401':
          description: Unauthorized
        '404':
          description: Dataspace not found
    get:
      operationId: listProjects
      tags:
        - Projects
      summary: List all projects in a dataspace
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
      responses:
        '200':
          description: List of projects
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Project'
        '401':
          description: Unauthorized
        '404':
          description: Dataspace not found
  /projects/{dataspaceId}/{projectId}:
    get:
      operationId: getProjectById
      tags:
        - Projects
      summary: Get a project by ID
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
        - schema:
            type: string
            format: uuid
            description: UUID of the project
          required: true
          description: UUID of the project
          name: projectId
          in: path
      responses:
        '200':
          description: Project details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '401':
          description: Unauthorized
        '404':
          description: Project or dataspace not found
    put:
      operationId: updateProject
      tags:
        - Projects
      summary: Update a project
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
        - schema:
            type: string
            format: uuid
            description: UUID of the project
          required: true
          description: UUID of the project
          name: projectId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProject'
      responses:
        '200':
          description: Project updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '400':
          description: Invalid input data
        '401':
          description: Unauthorized
        '404':
          description: Project or dataspace not found
    delete:
      operationId: deleteProject
      tags:
        - Projects
      summary: Delete a project
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
        - schema:
            type: string
            format: uuid
            description: UUID of the project
          required: true
          description: UUID of the project
          name: projectId
          in: path
      responses:
        '204':
          description: Project deleted successfully
        '401':
          description: Unauthorized
        '404':
          description: Project or dataspace not found
  /projects/{dataspaceId}/{projectId}/content/{contentId}:
    put:
      operationId: associateContentWithProject
      tags:
        - Projects
        - Content
      summary: Associate content with a project
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
        - schema:
            type: string
            format: uuid
            description: UUID of the project
          required: true
          description: UUID of the project
          name: projectId
          in: path
        - schema:
            type: string
            format: uuid
            description: UUID of the content
          required: true
          description: UUID of the content
          name: contentId
          in: path
      responses:
        '204':
          description: Content associated successfully
        '401':
          description: Unauthorized
        '404':
          description: Project, content, or dataspace not found
    delete:
      operationId: dissociateContentFromProject
      tags:
        - Projects
        - Content
      summary: Dissociate content from a project
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
        - schema:
            type: string
            format: uuid
            description: UUID of the project
          required: true
          description: UUID of the project
          name: projectId
          in: path
        - schema:
            type: string
            format: uuid
            description: UUID of the content
          required: true
          description: UUID of the content
          name: contentId
          in: path
      responses:
        '204':
          description: Content dissociated successfully
        '401':
          description: Unauthorized
        '404':
          description: Project, content, or dataspace not found
  /projects/{dataspaceId}/{projectId}/content:
    get:
      operationId: getProjectContent
      tags:
        - Projects
        - Content
      summary: Get all content associated with a project
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
        - schema:
            type: string
            format: uuid
            description: UUID of the project
          required: true
          description: UUID of the project
          name: projectId
          in: path
      responses:
        '200':
          description: List of content IDs associated with the project
          content:
            application/json:
              schema:
                type: object
                properties:
                  contentIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                required:
                  - contentIds
        '401':
          description: Unauthorized
        '404':
          description: Project or dataspace not found
  /content/{dataspaceId}:
    post:
      operationId: createContent
      tags:
        - Content
      summary: Create new content
      description: >-
        Upload files using multipart/form-data to directly upload files.

        **Comprehensive Validation System:**

        The content creation endpoint performs multiple layers of validation to
        ensure data integrity:

        **1. Schema Validation:** - `categoryId`: Must be a valid UUID -
        `metadata`: Must be a valid JSON object (if provided) - `fileFormat`:
        Required string specifying the file's MIME type - `fileName`: Optional
        string for the file name

        **2. Business Logic Validation:** - **Category Existence**: Validates
        that the specified `categoryId` exists in the dataspace's ontology -
        **Metadata Query Binding**: Ensures all provided metadata queries are
        bound to the specified category - **Data Type Validation**: Verifies
        that metadata values match the expected data types (STRING,
        SHORT_STRING, NUMBER, BOOLEAN, DATE)

        **3. Required Metadata Validation:** - **Default Behavior**:
        `validateRequiredMetadata` defaults to `true` when not specified -
        **When enabled** (default): Enforces that all required metadata queries
        and unique index elements are provided - **When disabled**
        (`validateRequiredMetadata=false`): Allows content creation without
        required metadata queries

        **4. File Upload Validation:** - File must be provided in the multipart
        form data - File format fallback: Uses detected MIME type if
        `fileFormat` not specified - File name fallback: Uses original filename
        if `fileName` not specified

        **Query Parameters:** - `validateRequiredMetadata`: Optional boolean
        (defaults to `true`) - Set to `"false"` to skip required metadata
        validation - Set to `"true"` or omit to enforce required metadata
        validation

        **Error Scenarios:** - `400 Bad Request`: Invalid schema, category not
        found, unbound metadata queries, type mismatches, missing required
        metadata - `401 Unauthorized`: Invalid or missing authentication - `404
        Not Found`: Dataspace not found
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
            example: sds-abc12345
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
        - schema:
            type: string
            description: >-
              Whether to validate that all required metadata queries are
              provided (defaults to true when not specified)
          required: false
          description: >-
            Whether to validate that all required metadata queries are provided
            (defaults to true when not specified)
          name: validateRequiredMetadata
          in: query
      requestBody:
        content:
          multipart/form-data:
            schema:
              allOf:
                - $ref: '#/components/schemas/CreateContentMultipart'
                - type: object
                  default: undefined
                  properties:
                    file:
                      type: string
                      description: The file to upload
                      format: binary
      responses:
        '201':
          description: Content created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  contentId:
                    type: string
                    format: uuid
                    example: 123e4567-e89b-12d3-a456-426614174000
                  categoryId:
                    type: string
                    format: uuid
                    example: 123e4567-e89b-12d3-a456-426614174001
                  dataspaceId:
                    type: string
                    format: uuid
                    example: 123e4567-e89b-12d3-a456-426614174002
                  fileFormat:
                    type: string
                    example: application/pdf
                  metadata:
                    type: object
                    properties: {}
                    description: Optional metadata for the content item
                    example:
                      category: documents
                      priority: 1
                  inferenceTaskExecutions:
                    type: object
                    additionalProperties:
                      type: string
                      format: uuid
                    description: >-
                      Optional record of inference task executions that modified
                      this content
                    example:
                      categoryId: 789e0123-e89b-12d3-a456-426614174002
                  vectorStoreFileId:
                    type: string
                    nullable: true
                    description: OpenAI vector store file ID (generated internally)
                    example: file-abc123xyz789
                  createdAt:
                    type: string
                    format: date-time
                    example: '2024-01-15T10:30:00Z'
                  updatedAt:
                    type: string
                    nullable: true
                    format: date-time
                    example: '2024-01-15T14:30:00Z'
                required:
                  - contentId
                  - categoryId
                  - dataspaceId
                  - fileFormat
                  - createdAt
                  - updatedAt
        '400':
          description: >-
            Invalid input data - includes schema validation errors, category
            validation errors, metadata binding errors, data type mismatches, or
            missing required metadata
        '401':
          description: Unauthorized
        '404':
          description: Dataspace or category not found
  /content/{dataspaceId}/{contentId}:
    get:
      operationId: getContentById
      tags:
        - Content
      summary: Get content by ID
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
            example: sds-abc12345
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
        - schema:
            type: string
            format: uuid
            description: UUID of the content item
            example: 123e4567-e89b-12d3-a456-426614174000
          required: true
          description: UUID of the content item
          name: contentId
          in: path
      responses:
        '200':
          description: Content details
          content:
            application/json:
              schema:
                type: object
                properties:
                  contentId:
                    type: string
                    format: uuid
                    example: 123e4567-e89b-12d3-a456-426614174000
                  categoryId:
                    type: string
                    format: uuid
                    example: 123e4567-e89b-12d3-a456-426614174001
                  dataspaceId:
                    type: string
                    format: uuid
                    example: 123e4567-e89b-12d3-a456-426614174002
                  fileFormat:
                    type: string
                    example: application/pdf
                  metadata:
                    type: object
                    properties: {}
                    description: Optional metadata for the content item
                    example:
                      category: documents
                      priority: 1
                  inferenceTaskExecutions:
                    type: object
                    additionalProperties:
                      type: string
                      format: uuid
                    description: >-
                      Optional record of inference task executions that modified
                      this content
                    example:
                      categoryId: 789e0123-e89b-12d3-a456-426614174002
                  vectorStoreFileId:
                    type: string
                    nullable: true
                    description: OpenAI vector store file ID (generated internally)
                    example: file-abc123xyz789
                  createdAt:
                    type: string
                    format: date-time
                    example: '2024-01-15T10:30:00Z'
                  updatedAt:
                    type: string
                    nullable: true
                    format: date-time
                    example: '2024-01-15T14:30:00Z'
                required:
                  - contentId
                  - categoryId
                  - dataspaceId
                  - fileFormat
                  - createdAt
                  - updatedAt
        '401':
          description: Unauthorized
        '404':
          description: Content or dataspace not found
    put:
      operationId: updateContent
      tags:
        - Content
      summary: Update content
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
            example: sds-abc12345
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
        - schema:
            type: string
            format: uuid
            description: UUID of the content item
            example: 123e4567-e89b-12d3-a456-426614174000
          required: true
          description: UUID of the content item
          name: contentId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateContent'
      responses:
        '200':
          description: Content updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  contentId:
                    type: string
                    format: uuid
                    example: 123e4567-e89b-12d3-a456-426614174000
                  categoryId:
                    type: string
                    format: uuid
                    example: 123e4567-e89b-12d3-a456-426614174001
                  dataspaceId:
                    type: string
                    format: uuid
                    example: 123e4567-e89b-12d3-a456-426614174002
                  fileFormat:
                    type: string
                    example: application/pdf
                  metadata:
                    type: object
                    properties: {}
                    description: Optional metadata for the content item
                    example:
                      category: documents
                      priority: 1
                  inferenceTaskExecutions:
                    type: object
                    additionalProperties:
                      type: string
                      format: uuid
                    description: >-
                      Optional record of inference task executions that modified
                      this content
                    example:
                      categoryId: 789e0123-e89b-12d3-a456-426614174002
                  vectorStoreFileId:
                    type: string
                    nullable: true
                    description: OpenAI vector store file ID (generated internally)
                    example: file-abc123xyz789
                  createdAt:
                    type: string
                    format: date-time
                    example: '2024-01-15T10:30:00Z'
                  updatedAt:
                    type: string
                    nullable: true
                    format: date-time
                    example: '2024-01-15T14:30:00Z'
                required:
                  - contentId
                  - categoryId
                  - dataspaceId
                  - fileFormat
                  - createdAt
                  - updatedAt
        '400':
          description: Invalid input data
        '401':
          description: Unauthorized
        '404':
          description: Content or dataspace not found
    delete:
      operationId: deleteContent
      tags:
        - Content
      summary: Delete content
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
            example: sds-abc12345
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
        - schema:
            type: string
            format: uuid
            description: UUID of the content item
            example: 123e4567-e89b-12d3-a456-426614174000
          required: true
          description: UUID of the content item
          name: contentId
          in: path
      responses:
        '204':
          description: Content deleted successfully
        '401':
          description: Unauthorized
        '404':
          description: Content or dataspace not found
  /content/{dataspaceId}/{contentId}/download:
    get:
      operationId: downloadContent
      tags:
        - Content
      summary: Download content file
      description: Download the actual file associated with the content item
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
            example: sds-abc12345
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
        - schema:
            type: string
            format: uuid
            description: UUID of the content item
            example: 123e4567-e89b-12d3-a456-426614174000
          required: true
          description: UUID of the content item
          name: contentId
          in: path
      responses:
        '200':
          description: File download
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '401':
          description: Unauthorized
        '404':
          description: Content or file not found
  /content/{dataspaceId}/count:
    get:
      operationId: countContent
      tags:
        - Content
      summary: Count content items
      description: >-
        Returns the total count of content items in a dataspace with optional
        filtering.

        **Filtering Options:** - `categoryId`: Filter by specific category UUID
        - `fileFormat`: Filter by file format/MIME type - `dateFrom`: Filter by
        creation date from (ISO 8601 format) - `dateTo`: Filter by creation date
        to (ISO 8601 format)

        **Features:** - Efficient counting using SQL COUNT queries - Multiple
        filter combinations supported - Date range filtering for temporal
        analysis - Category-specific content counting - File format filtering
        for content type analysis

        **Example Usage:** - Count all content: `GET
        /content/sds-12345678/count` - Count by category: `GET
        /content/sds-12345678/count?categoryId=123e4567-e89b-12d3-a456-426614174001`
        - Count PDFs: `GET
        /content/sds-12345678/count?fileFormat=application/pdf` - Count recent
        content: `GET /content/sds-12345678/count?dateFrom=2024-01-01T00:00:00Z`
        - Combined filters: `GET
        /content/sds-12345678/count?categoryId=123e4567-e89b-12d3-a456-426614174001&fileFormat=application/pdf`

        **Performance:** - Optimized for large datasets using database indexes -
        Returns exact counts without loading content items into memory -
        Suitable for dashboard statistics and analytics
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
            example: sds-abc12345
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
        - schema:
            type: string
            format: uuid
            description: Filter by category ID
            example: 123e4567-e89b-12d3-a456-426614174001
          required: false
          description: Filter by category ID
          name: categoryId
          in: query
        - schema:
            type: string
            description: Filter by file format
            example: application/pdf
          required: false
          description: Filter by file format
          name: fileFormat
          in: query
        - schema:
            type: string
            description: Filter by date from (ISO 8601 format)
            example: '2024-01-01T00:00:00Z'
          required: false
          description: Filter by date from (ISO 8601 format)
          name: dateFrom
          in: query
        - schema:
            type: string
            description: Filter by date to (ISO 8601 format)
            example: '2024-12-31T23:59:59Z'
          required: false
          description: Filter by date to (ISO 8601 format)
          name: dateTo
          in: query
      responses:
        '200':
          description: Content count retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    minimum: 0
                    description: Total number of content items matching the filters
                    example: 42
                required:
                  - count
        '400':
          description: Invalid query parameters
        '401':
          description: Unauthorized
        '404':
          description: Dataspace not found
  /content/{dataspaceId}/fetch:
    post:
      operationId: fetchContent
      tags:
        - Content
      summary: Fetch content with advanced filtering, pagination, and version grouping
      description: >-
        Retrieves a list of content items with comprehensive filtering
        capabilities and optional version grouping.

        **Top-level Field Filtering:** - `contentId`, `categoryId`, `fileName`,
        `fileFormat`, `createdAt`, `updatedAt`

        **Metadata Field Filtering:** - Filter on any metadata query using
        nested structure: `metadata: { "keyName": value }`

        **Advanced Operators:** - `eq`, `ne` - Equality/inequality - `gt`,
        `gte`, `lt`, `lte` - Comparison (dates/numbers) - `between` - Range
        filtering: `[min, max]` - `in`, `nin` - Array membership - `contains`,
        `startsWith`, `endsWith` - String operations - `exists` - Field presence
        check

        **Version Grouping:** - `groupByVersion`: When `true`, groups content by
        version strings and returns only the most recent item per version -
        Version strings are calculated from category name + metadata values
        where `uniqueIndexElement` is `true` - Format:
        `"category_name_value1_value2"` (lowercase, underscore-separated) -
        Returns `relatedVersions` array containing objects with id, filename,
        and created_at for other content items sharing the same version - When
        `false` or omitted, `relatedVersions` is `null` and all content is
        returned - **Special case**: When filtering by `contentId` AND
        `groupByVersion` is `true`, returns the specified content item with all
        its related versions attached

        **Logging Control:** - `disabledLogging`: When `true`, disables query
        logging for this request (both console logs and database query logs) -
        When `false` or omitted, normal logging behavior is maintained - Useful
        for high-frequency operations or when logging is not desired

        **Features:** - Cursor-based pagination with `pageSize` and `cursor` -
        Field selection with `fields` parameter - Mixed filtering (combine
        top-level and metadata filters) - Version grouping for content
        deduplication - Optional logging control for performance optimization -
        Backward compatible with empty filters

        **Example Request (with version grouping and disabled logging):**
        ```json { "query": "annual report", "groupByVersion": true,
        "disabledLogging": false, "filters": { "fileFormat": { "in":
        ["application/pdf"] }, "createdAt": { "gte": "2025-01-01T00:00:00Z" },
        "metadata": { "Status": { "ne": "Archived" }, "Business Type": { "in":
        ["Restaurant", "Retail"] } } } } ```

        **Example Response (with version grouping):** ```json { "contentItems":
        [ { "contentId": "123e4567-e89b-12d3-a456-426614174000", "categoryId":
        "456e7890-e89b-12d3-a456-426614174001", "fileName": "license_v2.pdf",
        "createdAt": "2025-01-15T10:30:00Z", "relatedVersions": [ { "id":
        "789e0123-e89b-12d3-a456-426614174002", "filename": "license_v1.pdf",
        "created_at": "2025-01-14T09:15:00Z" } ] } ] } ```
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
            example: sds-abc12345
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
        - schema:
            type: string
            format: uuid
            description: Cursor for pagination
            example: 123e4567-e89b-12d3-a456-426614174000
          required: false
          description: Cursor for pagination
          name: cursor
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            description: Number of items per page
            example: 20
          required: true
          description: Number of items per page
          name: pageSize
          in: query
        - schema:
            type: string
            description: Comma-separated list of fields to include
            example: contentId,categoryId,fileName
          required: false
          description: Comma-separated list of fields to include
          name: fields
          in: query
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  description: >-
                    Text query for full-text search across content metadata
                    (filename, metadata query/values, categories, etc.) - does
                    not search the actual content body
                  example: annual report 2024
                groupByVersion:
                  type: boolean
                  default: false
                  description: >-
                    Group content by version (category name + unique index
                    metadata values)
                  example: false
                filters:
                  type: object
                  properties:
                    contentId:
                      anyOf:
                        - type: string
                          description: Simple string match value
                          example: example-value
                        - type: number
                          description: Simple number match value
                          example: 42
                        - type: boolean
                          description: Simple boolean match value
                          example: true
                        - type: object
                          properties:
                            eq:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Equals - exact match
                              example: exact-value
                            ne:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Not equals - exclude exact match
                              example: exclude-value
                            gt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than - for numbers and dates
                              example: 100
                            gte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than or equal - for numbers and dates
                              example: 100
                            lt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than - for numbers and dates
                              example: 50
                            lte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than or equal - for numbers and dates
                              example: 50
                            between:
                              type: array
                              items:
                                anyOf:
                                  - type: number
                                  - type: string
                              minItems: 2
                              maxItems: 2
                              description: >-
                                Between two values [min, max] - for numbers and
                                dates
                              example:
                                - 10
                                - 100
                            in:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is in the provided array
                              example:
                                - value1
                                - value2
                                - value3
                            nin:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is not in the provided array
                              example:
                                - exclude1
                                - exclude2
                            startsWith:
                              type: string
                              description: String starts with the provided value
                              example: prefix
                            inference_task_executions:
                              type: object
                              additionalProperties:
                                type: string
                                format: uuid
                              default: {}
                            endsWith:
                              type: string
                              description: String ends with the provided value
                              example: suffix
                            contains:
                              type: string
                              description: String contains the provided value
                              example: substring
                            exists:
                              type: boolean
                              description: Field exists (true) or does not exist (false)
                              example: true
                            isNull:
                              type: boolean
                              description: Field is null (true) or is not null (false)
                              example: false
                            isNotNull:
                              type: boolean
                              description: Field is not null (true) or is null (false)
                              example: true
                          additionalProperties: false
                          description: Advanced filter operators for complex queries
                      description: Filter by content ID
                    categoryId:
                      anyOf:
                        - type: string
                          description: Simple string match value
                          example: example-value
                        - type: number
                          description: Simple number match value
                          example: 42
                        - type: boolean
                          description: Simple boolean match value
                          example: true
                        - type: object
                          properties:
                            eq:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Equals - exact match
                              example: exact-value
                            ne:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Not equals - exclude exact match
                              example: exclude-value
                            gt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than - for numbers and dates
                              example: 100
                            gte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than or equal - for numbers and dates
                              example: 100
                            lt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than - for numbers and dates
                              example: 50
                            lte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than or equal - for numbers and dates
                              example: 50
                            between:
                              type: array
                              items:
                                anyOf:
                                  - type: number
                                  - type: string
                              minItems: 2
                              maxItems: 2
                              description: >-
                                Between two values [min, max] - for numbers and
                                dates
                              example:
                                - 10
                                - 100
                            in:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is in the provided array
                              example:
                                - value1
                                - value2
                                - value3
                            nin:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is not in the provided array
                              example:
                                - exclude1
                                - exclude2
                            startsWith:
                              type: string
                              description: String starts with the provided value
                              example: prefix
                            inference_task_executions:
                              type: object
                              additionalProperties:
                                type: string
                                format: uuid
                              default: {}
                            endsWith:
                              type: string
                              description: String ends with the provided value
                              example: suffix
                            contains:
                              type: string
                              description: String contains the provided value
                              example: substring
                            exists:
                              type: boolean
                              description: Field exists (true) or does not exist (false)
                              example: true
                            isNull:
                              type: boolean
                              description: Field is null (true) or is not null (false)
                              example: false
                            isNotNull:
                              type: boolean
                              description: Field is not null (true) or is null (false)
                              example: true
                          additionalProperties: false
                          description: Advanced filter operators for complex queries
                      description: Filter by category ID
                    fileName:
                      anyOf:
                        - type: string
                          description: Simple string match value
                          example: example-value
                        - type: number
                          description: Simple number match value
                          example: 42
                        - type: boolean
                          description: Simple boolean match value
                          example: true
                        - type: object
                          properties:
                            eq:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Equals - exact match
                              example: exact-value
                            ne:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Not equals - exclude exact match
                              example: exclude-value
                            gt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than - for numbers and dates
                              example: 100
                            gte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than or equal - for numbers and dates
                              example: 100
                            lt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than - for numbers and dates
                              example: 50
                            lte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than or equal - for numbers and dates
                              example: 50
                            between:
                              type: array
                              items:
                                anyOf:
                                  - type: number
                                  - type: string
                              minItems: 2
                              maxItems: 2
                              description: >-
                                Between two values [min, max] - for numbers and
                                dates
                              example:
                                - 10
                                - 100
                            in:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is in the provided array
                              example:
                                - value1
                                - value2
                                - value3
                            nin:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is not in the provided array
                              example:
                                - exclude1
                                - exclude2
                            startsWith:
                              type: string
                              description: String starts with the provided value
                              example: prefix
                            inference_task_executions:
                              type: object
                              additionalProperties:
                                type: string
                                format: uuid
                              default: {}
                            endsWith:
                              type: string
                              description: String ends with the provided value
                              example: suffix
                            contains:
                              type: string
                              description: String contains the provided value
                              example: substring
                            exists:
                              type: boolean
                              description: Field exists (true) or does not exist (false)
                              example: true
                            isNull:
                              type: boolean
                              description: Field is null (true) or is not null (false)
                              example: false
                            isNotNull:
                              type: boolean
                              description: Field is not null (true) or is null (false)
                              example: true
                          additionalProperties: false
                          description: Advanced filter operators for complex queries
                      description: Filter by file name
                    fileFormat:
                      anyOf:
                        - type: string
                          description: Simple string match value
                          example: example-value
                        - type: number
                          description: Simple number match value
                          example: 42
                        - type: boolean
                          description: Simple boolean match value
                          example: true
                        - type: object
                          properties:
                            eq:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Equals - exact match
                              example: exact-value
                            ne:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Not equals - exclude exact match
                              example: exclude-value
                            gt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than - for numbers and dates
                              example: 100
                            gte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than or equal - for numbers and dates
                              example: 100
                            lt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than - for numbers and dates
                              example: 50
                            lte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than or equal - for numbers and dates
                              example: 50
                            between:
                              type: array
                              items:
                                anyOf:
                                  - type: number
                                  - type: string
                              minItems: 2
                              maxItems: 2
                              description: >-
                                Between two values [min, max] - for numbers and
                                dates
                              example:
                                - 10
                                - 100
                            in:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is in the provided array
                              example:
                                - value1
                                - value2
                                - value3
                            nin:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is not in the provided array
                              example:
                                - exclude1
                                - exclude2
                            startsWith:
                              type: string
                              description: String starts with the provided value
                              example: prefix
                            inference_task_executions:
                              type: object
                              additionalProperties:
                                type: string
                                format: uuid
                              default: {}
                            endsWith:
                              type: string
                              description: String ends with the provided value
                              example: suffix
                            contains:
                              type: string
                              description: String contains the provided value
                              example: substring
                            exists:
                              type: boolean
                              description: Field exists (true) or does not exist (false)
                              example: true
                            isNull:
                              type: boolean
                              description: Field is null (true) or is not null (false)
                              example: false
                            isNotNull:
                              type: boolean
                              description: Field is not null (true) or is null (false)
                              example: true
                          additionalProperties: false
                          description: Advanced filter operators for complex queries
                      description: Filter by file format/MIME type
                    createdAt:
                      anyOf:
                        - type: string
                          description: Simple string match value
                          example: example-value
                        - type: number
                          description: Simple number match value
                          example: 42
                        - type: boolean
                          description: Simple boolean match value
                          example: true
                        - type: object
                          properties:
                            eq:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Equals - exact match
                              example: exact-value
                            ne:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Not equals - exclude exact match
                              example: exclude-value
                            gt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than - for numbers and dates
                              example: 100
                            gte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than or equal - for numbers and dates
                              example: 100
                            lt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than - for numbers and dates
                              example: 50
                            lte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than or equal - for numbers and dates
                              example: 50
                            between:
                              type: array
                              items:
                                anyOf:
                                  - type: number
                                  - type: string
                              minItems: 2
                              maxItems: 2
                              description: >-
                                Between two values [min, max] - for numbers and
                                dates
                              example:
                                - 10
                                - 100
                            in:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is in the provided array
                              example:
                                - value1
                                - value2
                                - value3
                            nin:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is not in the provided array
                              example:
                                - exclude1
                                - exclude2
                            startsWith:
                              type: string
                              description: String starts with the provided value
                              example: prefix
                            inference_task_executions:
                              type: object
                              additionalProperties:
                                type: string
                                format: uuid
                              default: {}
                            endsWith:
                              type: string
                              description: String ends with the provided value
                              example: suffix
                            contains:
                              type: string
                              description: String contains the provided value
                              example: substring
                            exists:
                              type: boolean
                              description: Field exists (true) or does not exist (false)
                              example: true
                            isNull:
                              type: boolean
                              description: Field is null (true) or is not null (false)
                              example: false
                            isNotNull:
                              type: boolean
                              description: Field is not null (true) or is null (false)
                              example: true
                          additionalProperties: false
                          description: Advanced filter operators for complex queries
                      description: Filter by creation date
                    updatedAt:
                      anyOf:
                        - type: string
                          description: Simple string match value
                          example: example-value
                        - type: number
                          description: Simple number match value
                          example: 42
                        - type: boolean
                          description: Simple boolean match value
                          example: true
                        - type: object
                          properties:
                            eq:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Equals - exact match
                              example: exact-value
                            ne:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Not equals - exclude exact match
                              example: exclude-value
                            gt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than - for numbers and dates
                              example: 100
                            gte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than or equal - for numbers and dates
                              example: 100
                            lt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than - for numbers and dates
                              example: 50
                            lte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than or equal - for numbers and dates
                              example: 50
                            between:
                              type: array
                              items:
                                anyOf:
                                  - type: number
                                  - type: string
                              minItems: 2
                              maxItems: 2
                              description: >-
                                Between two values [min, max] - for numbers and
                                dates
                              example:
                                - 10
                                - 100
                            in:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is in the provided array
                              example:
                                - value1
                                - value2
                                - value3
                            nin:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is not in the provided array
                              example:
                                - exclude1
                                - exclude2
                            startsWith:
                              type: string
                              description: String starts with the provided value
                              example: prefix
                            inference_task_executions:
                              type: object
                              additionalProperties:
                                type: string
                                format: uuid
                              default: {}
                            endsWith:
                              type: string
                              description: String ends with the provided value
                              example: suffix
                            contains:
                              type: string
                              description: String contains the provided value
                              example: substring
                            exists:
                              type: boolean
                              description: Field exists (true) or does not exist (false)
                              example: true
                            isNull:
                              type: boolean
                              description: Field is null (true) or is not null (false)
                              example: false
                            isNotNull:
                              type: boolean
                              description: Field is not null (true) or is null (false)
                              example: true
                          additionalProperties: false
                          description: Advanced filter operators for complex queries
                      description: Filter by last update date
                    metadata:
                      type: object
                      additionalProperties:
                        anyOf:
                          - type: string
                            description: Simple string match value
                            example: example-value
                          - type: number
                            description: Simple number match value
                            example: 42
                          - type: boolean
                            description: Simple boolean match value
                            example: true
                          - type: object
                            properties:
                              eq:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                description: Equals - exact match
                                example: exact-value
                              ne:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                description: Not equals - exclude exact match
                                example: exclude-value
                              gt:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Greater than - for numbers and dates
                                example: 100
                              gte:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Greater than or equal - for numbers and dates
                                example: 100
                              lt:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Less than - for numbers and dates
                                example: 50
                              lte:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Less than or equal - for numbers and dates
                                example: 50
                              between:
                                type: array
                                items:
                                  anyOf:
                                    - type: number
                                    - type: string
                                minItems: 2
                                maxItems: 2
                                description: >-
                                  Between two values [min, max] - for numbers
                                  and dates
                                example:
                                  - 10
                                  - 100
                              in:
                                type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                description: Value is in the provided array
                                example:
                                  - value1
                                  - value2
                                  - value3
                              nin:
                                type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                description: Value is not in the provided array
                                example:
                                  - exclude1
                                  - exclude2
                              startsWith:
                                type: string
                                description: String starts with the provided value
                                example: prefix
                              inference_task_executions:
                                type: object
                                additionalProperties:
                                  type: string
                                  format: uuid
                                default: {}
                              endsWith:
                                type: string
                                description: String ends with the provided value
                                example: suffix
                              contains:
                                type: string
                                description: String contains the provided value
                                example: substring
                              exists:
                                type: boolean
                                description: Field exists (true) or does not exist (false)
                                example: true
                              isNull:
                                type: boolean
                                description: Field is null (true) or is not null (false)
                                example: false
                              isNotNull:
                                type: boolean
                                description: Field is not null (true) or is null (false)
                                example: true
                            additionalProperties: false
                            description: Advanced filter operators for complex queries
                        description: >-
                          Filter value - can be a simple value for exact match
                          or an object with operators
                      description: >-
                        Filter by metadata fields - key-value pairs where values
                        can use advanced operators
                  additionalProperties: false
              description: >-
                Request body for content filtering with advanced operators on
                any field, version grouping and optional text query
      responses:
        '200':
          description: Content items fetched successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  contentItems:
                    type: array
                    items:
                      type: object
                      properties:
                        contentId:
                          type: string
                          format: uuid
                          example: 123e4567-e89b-12d3-a456-426614174000
                        categoryId:
                          type: string
                          nullable: true
                          format: uuid
                          example: 123e4567-e89b-12d3-a456-426614174001
                        dataspaceId:
                          type: string
                          pattern: ^sds-[a-z0-9]{8}$
                          description: Short dataspace ID with sds- prefix
                          example: sds-abc12345
                        metadata:
                          type: object
                          properties: {}
                          description: Optional metadata for the content item
                          example:
                            category: research
                            priority: 1
                        inferenceTaskExecutions:
                          type: object
                          additionalProperties:
                            type: string
                            format: uuid
                          description: >-
                            Optional record of inference task executions that
                            modified this content
                          example:
                            categoryId: 789e0123-e89b-12d3-a456-426614174002
                        fileFormat:
                          type: string
                          example: application/pdf
                        fileName:
                          type: string
                          example: document.pdf
                        createdAt:
                          type: string
                          format: date-time
                          example: '2024-01-15T10:30:00Z'
                        updatedAt:
                          type: string
                          nullable: true
                          format: date-time
                          example: '2024-01-15T14:30:00Z'
                        relatedVersions:
                          type: array
                          nullable: true
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                                description: Content ID of the related version
                                example: 456e7890-e89b-12d3-a456-426614174001
                              filename:
                                type: string
                                description: Filename of the related version
                                example: document_v2.pdf
                              created_at:
                                type: string
                                format: date-time
                                description: Creation date of the related version
                                example: '2024-01-15T10:30:00Z'
                            required:
                              - id
                              - filename
                              - created_at
                          description: >-
                            Related content versions that share the same version
                            string (null when groupByVersion is false)
                          example:
                            - id: 456e7890-e89b-12d3-a456-426614174001
                              filename: document_v1.pdf
                              created_at: '2024-01-15T10:30:00Z'
                            - id: 789e0123-e89b-12d3-a456-426614174002
                              filename: document_v2.pdf
                              created_at: '2024-01-16T14:20:00Z'
                      required:
                        - contentId
                  nextCursor:
                    type: string
                    format: uuid
                    example: 123e4567-e89b-12d3-a456-426614174001
                  totalItems:
                    type: integer
                    example: 42
                required:
                  - contentItems
                  - totalItems
        '400':
          description: Invalid request parameters or filters
        '401':
          description: Unauthorized
        '404':
          description: Dataspace not found
  /content/{dataspaceId}/{contentId}/ingest:
    post:
      operationId: ingestContent
      tags:
        - Content
      summary: Ingest content with a workflow
      description: >-
        Triggers workflow execution for a specific content item and returns the
        complete workflow execution object. The system automatically selects the
        first available agent for the user's account.

        **Workflow Ingestion Process:** 1. Validates that the content item
        exists 2. Validates that the specified workflow exists 3. Automatically
        selects the first available agent for the user's account 4. Creates a
        workflow execution record 5. Executes all tasks in the workflow
        sequentially in the background using the selected agent 6. Returns the
        complete workflow execution object immediately

        **Response Object:** The endpoint returns a complete workflow execution
        object containing: - `id`: Unique identifier for this workflow execution
        - `workflowId`: ID of the workflow being executed - `contentId`: ID of
        the content being processed - `dataspaceId`: ID of the dataspace -
        `status`: Current status ('started', 'completed', or 'failed') -
        `startedAt`: Timestamp when execution began - `completedAt`: Timestamp
        when execution finished (null if still running) - `errorMessage`: Error
        details if execution failed (null if successful)

        **Features:** - Asynchronous workflow execution - Comprehensive
        validation before execution - Automatic agent selection for the user's
        account - Detailed logging and error handling - Database tracking of
        workflow and task executions - Complete workflow execution object
        response

        **Example Usage:** `POST
        /api/content/sds-12345678/550e8400-e29b-41d4-a716-446655440000/ingest?workflowId=8a0667a8-a35e-4b0a-8a95-07b4fd5ac7de`

        The workflow will execute in the background, and you can monitor its
        progress using the returned workflow execution object.
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Dataspace ID with sds- prefix
            example: sds-abc12345
          required: true
          description: Dataspace ID with sds- prefix
          name: dataspaceId
          in: path
        - schema:
            type: string
            format: uuid
            description: UUID of the content item
            example: 123e4567-e89b-12d3-a456-426614174000
          required: true
          description: UUID of the content item
          name: contentId
          in: path
        - schema:
            type: string
            format: uuid
            description: UUID of the workflow to execute
            example: 123e4567-e89b-12d3-a456-426614174002
          required: true
          description: UUID of the workflow to execute
          name: workflowId
          in: query
      responses:
        '202':
          description: Workflow ingestion started successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    example: 123e4567-e89b-12d3-a456-426614174000
                  workflowId:
                    type: string
                    format: uuid
                    example: 987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b
                  primaryScopeObjectId:
                    type: string
                    format: uuid
                    example: 456e7890-e89b-12d3-a456-426614174001
                  primaryScopeDataspaceId:
                    type: string
                    pattern: ^sds-[a-z0-9]{8}$
                    description: Short dataspace ID with sds- prefix
                    example: sds-abc12345
                  status:
                    type: string
                    enum:
                      - started
                      - completed
                      - failed
                    example: completed
                  startedAt:
                    type: string
                    format: date-time
                    example: '2025-01-15T10:30:00Z'
                  completedAt:
                    type: string
                    nullable: true
                    format: date-time
                    example: '2025-01-15T10:35:00Z'
                  errorMessage:
                    type: string
                    nullable: true
                    example: Workflow execution failed at step 3
                required:
                  - id
                  - workflowId
                  - primaryScopeObjectId
                  - primaryScopeDataspaceId
                  - status
                  - startedAt
                  - completedAt
                  - errorMessage
        '400':
          description: Invalid content ID, workflow ID, or workflow validation failed
        '401':
          description: Unauthorized
        '404':
          description: Content item, dataspace, or workflow not found
  /content/{dataspaceId}/query:
    post:
      operationId: queryContent
      tags:
        - Content
      summary: Query content using AI assistant with vector store access
      description: >-
        Performs intelligent queries on content using OpenAI's assistant with
        vector store access.

        **Query Process:** 1. **Agent Selection**: Uses the specified agent's
        instructions as the system prompt, or defaults to research assistant
        instructions 2. **Content Filtering**: Uses the provided filters to
        select relevant content items from the dataspace 3. **Vector Store
        Access**: Retrieves the dataspace's vector store containing document
        embeddings 4. **AI Assistant Creation**: Creates a temporary OpenAI
        assistant with access to the vector store 5. **Query Execution**:
        Processes the user's query against the filtered content using the AI
        assistant 6. **Citation Parsing**: Extracts file IDs from the AI
        response citations 7. **Content Retrieval**: Fetches full content
        objects for all cited documents

        **Agent System:** - **Optional Agent ID**: Provide an `agentId` to use
        custom agent instructions as the system prompt - **Default Behavior**:
        Without an agent ID, uses built-in research assistant instructions -
        **Agent Instructions**: The agent's instructions field becomes the
        system prompt for the AI assistant - **Research Agent**: Look for an
        agent named "Research Assistant Agent" for the default research
        experience

        **Request Body:** - `filters`: Advanced filtering options to select
        specific content (uses unified ContentFiltersSchema) - `query`: The
        question or query to ask about the filtered content - `agentId`:
        (Optional) UUID of the agent whose instructions to use as system prompt

        **Response Fields:** - `query`: The original user query - `response`: AI
        assistant's response with citations in simplified format -
        `analyzedDocumentCount`: Number of documents that were analyzed and
        available for querying - `citedContent`: Array of full content objects
        that were actually cited in the AI response

        **Citation Format:** The AI response includes citations in simplified
        format: `【0】`, `【1】`, etc., where numbers reference the `citedContent`
        array indices.

        **Performance Notes:** - Creates and destroys a temporary OpenAI
        assistant for each query - Processes up to 9999 content items for
        analysis - Response time depends on query complexity and document count
        - Agent lookup adds minimal overhead when agent ID is provided
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
            example: sds-abc12345
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  minLength: 1
                  description: The question or query to ask about the filtered content
                  example: What are the main themes discussed in these documents?
                agentId:
                  type: string
                  description: >-
                    Optional agent ID to use for the query. If provided, the
                    agent's instructions will be used as the system prompt.
                  example: 01234567-89ab-cdef-0123-456789abcdef
                context:
                  type: object
                  properties:
                    contentFilters:
                      type: object
                      properties:
                        contentId:
                          anyOf:
                            - type: string
                              description: Simple string match value
                              example: example-value
                            - type: number
                              description: Simple number match value
                              example: 42
                            - type: boolean
                              description: Simple boolean match value
                              example: true
                            - type: object
                              properties:
                                eq:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                  description: Equals - exact match
                                  example: exact-value
                                ne:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                  description: Not equals - exclude exact match
                                  example: exclude-value
                                gt:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Greater than - for numbers and dates
                                  example: 100
                                gte:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: >-
                                    Greater than or equal - for numbers and
                                    dates
                                  example: 100
                                lt:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Less than - for numbers and dates
                                  example: 50
                                lte:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Less than or equal - for numbers and dates
                                  example: 50
                                between:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: number
                                      - type: string
                                  minItems: 2
                                  maxItems: 2
                                  description: >-
                                    Between two values [min, max] - for numbers
                                    and dates
                                  example:
                                    - 10
                                    - 100
                                in:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                  description: Value is in the provided array
                                  example:
                                    - value1
                                    - value2
                                    - value3
                                nin:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                  description: Value is not in the provided array
                                  example:
                                    - exclude1
                                    - exclude2
                                startsWith:
                                  type: string
                                  description: String starts with the provided value
                                  example: prefix
                                inference_task_executions:
                                  type: object
                                  additionalProperties:
                                    type: string
                                    format: uuid
                                  default: {}
                                endsWith:
                                  type: string
                                  description: String ends with the provided value
                                  example: suffix
                                contains:
                                  type: string
                                  description: String contains the provided value
                                  example: substring
                                exists:
                                  type: boolean
                                  description: >-
                                    Field exists (true) or does not exist
                                    (false)
                                  example: true
                                isNull:
                                  type: boolean
                                  description: Field is null (true) or is not null (false)
                                  example: false
                                isNotNull:
                                  type: boolean
                                  description: Field is not null (true) or is null (false)
                                  example: true
                              additionalProperties: false
                              description: Advanced filter operators for complex queries
                          description: Filter by content ID
                        categoryId:
                          anyOf:
                            - type: string
                              description: Simple string match value
                              example: example-value
                            - type: number
                              description: Simple number match value
                              example: 42
                            - type: boolean
                              description: Simple boolean match value
                              example: true
                            - type: object
                              properties:
                                eq:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                  description: Equals - exact match
                                  example: exact-value
                                ne:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                  description: Not equals - exclude exact match
                                  example: exclude-value
                                gt:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Greater than - for numbers and dates
                                  example: 100
                                gte:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: >-
                                    Greater than or equal - for numbers and
                                    dates
                                  example: 100
                                lt:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Less than - for numbers and dates
                                  example: 50
                                lte:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Less than or equal - for numbers and dates
                                  example: 50
                                between:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: number
                                      - type: string
                                  minItems: 2
                                  maxItems: 2
                                  description: >-
                                    Between two values [min, max] - for numbers
                                    and dates
                                  example:
                                    - 10
                                    - 100
                                in:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                  description: Value is in the provided array
                                  example:
                                    - value1
                                    - value2
                                    - value3
                                nin:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                  description: Value is not in the provided array
                                  example:
                                    - exclude1
                                    - exclude2
                                startsWith:
                                  type: string
                                  description: String starts with the provided value
                                  example: prefix
                                inference_task_executions:
                                  type: object
                                  additionalProperties:
                                    type: string
                                    format: uuid
                                  default: {}
                                endsWith:
                                  type: string
                                  description: String ends with the provided value
                                  example: suffix
                                contains:
                                  type: string
                                  description: String contains the provided value
                                  example: substring
                                exists:
                                  type: boolean
                                  description: >-
                                    Field exists (true) or does not exist
                                    (false)
                                  example: true
                                isNull:
                                  type: boolean
                                  description: Field is null (true) or is not null (false)
                                  example: false
                                isNotNull:
                                  type: boolean
                                  description: Field is not null (true) or is null (false)
                                  example: true
                              additionalProperties: false
                              description: Advanced filter operators for complex queries
                          description: Filter by category ID
                        fileName:
                          anyOf:
                            - type: string
                              description: Simple string match value
                              example: example-value
                            - type: number
                              description: Simple number match value
                              example: 42
                            - type: boolean
                              description: Simple boolean match value
                              example: true
                            - type: object
                              properties:
                                eq:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                  description: Equals - exact match
                                  example: exact-value
                                ne:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                  description: Not equals - exclude exact match
                                  example: exclude-value
                                gt:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Greater than - for numbers and dates
                                  example: 100
                                gte:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: >-
                                    Greater than or equal - for numbers and
                                    dates
                                  example: 100
                                lt:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Less than - for numbers and dates
                                  example: 50
                                lte:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Less than or equal - for numbers and dates
                                  example: 50
                                between:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: number
                                      - type: string
                                  minItems: 2
                                  maxItems: 2
                                  description: >-
                                    Between two values [min, max] - for numbers
                                    and dates
                                  example:
                                    - 10
                                    - 100
                                in:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                  description: Value is in the provided array
                                  example:
                                    - value1
                                    - value2
                                    - value3
                                nin:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                  description: Value is not in the provided array
                                  example:
                                    - exclude1
                                    - exclude2
                                startsWith:
                                  type: string
                                  description: String starts with the provided value
                                  example: prefix
                                inference_task_executions:
                                  type: object
                                  additionalProperties:
                                    type: string
                                    format: uuid
                                  default: {}
                                endsWith:
                                  type: string
                                  description: String ends with the provided value
                                  example: suffix
                                contains:
                                  type: string
                                  description: String contains the provided value
                                  example: substring
                                exists:
                                  type: boolean
                                  description: >-
                                    Field exists (true) or does not exist
                                    (false)
                                  example: true
                                isNull:
                                  type: boolean
                                  description: Field is null (true) or is not null (false)
                                  example: false
                                isNotNull:
                                  type: boolean
                                  description: Field is not null (true) or is null (false)
                                  example: true
                              additionalProperties: false
                              description: Advanced filter operators for complex queries
                          description: Filter by file name
                        fileFormat:
                          anyOf:
                            - type: string
                              description: Simple string match value
                              example: example-value
                            - type: number
                              description: Simple number match value
                              example: 42
                            - type: boolean
                              description: Simple boolean match value
                              example: true
                            - type: object
                              properties:
                                eq:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                  description: Equals - exact match
                                  example: exact-value
                                ne:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                  description: Not equals - exclude exact match
                                  example: exclude-value
                                gt:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Greater than - for numbers and dates
                                  example: 100
                                gte:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: >-
                                    Greater than or equal - for numbers and
                                    dates
                                  example: 100
                                lt:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Less than - for numbers and dates
                                  example: 50
                                lte:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Less than or equal - for numbers and dates
                                  example: 50
                                between:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: number
                                      - type: string
                                  minItems: 2
                                  maxItems: 2
                                  description: >-
                                    Between two values [min, max] - for numbers
                                    and dates
                                  example:
                                    - 10
                                    - 100
                                in:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                  description: Value is in the provided array
                                  example:
                                    - value1
                                    - value2
                                    - value3
                                nin:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                  description: Value is not in the provided array
                                  example:
                                    - exclude1
                                    - exclude2
                                startsWith:
                                  type: string
                                  description: String starts with the provided value
                                  example: prefix
                                inference_task_executions:
                                  type: object
                                  additionalProperties:
                                    type: string
                                    format: uuid
                                  default: {}
                                endsWith:
                                  type: string
                                  description: String ends with the provided value
                                  example: suffix
                                contains:
                                  type: string
                                  description: String contains the provided value
                                  example: substring
                                exists:
                                  type: boolean
                                  description: >-
                                    Field exists (true) or does not exist
                                    (false)
                                  example: true
                                isNull:
                                  type: boolean
                                  description: Field is null (true) or is not null (false)
                                  example: false
                                isNotNull:
                                  type: boolean
                                  description: Field is not null (true) or is null (false)
                                  example: true
                              additionalProperties: false
                              description: Advanced filter operators for complex queries
                          description: Filter by file format/MIME type
                        createdAt:
                          anyOf:
                            - type: string
                              description: Simple string match value
                              example: example-value
                            - type: number
                              description: Simple number match value
                              example: 42
                            - type: boolean
                              description: Simple boolean match value
                              example: true
                            - type: object
                              properties:
                                eq:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                  description: Equals - exact match
                                  example: exact-value
                                ne:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                  description: Not equals - exclude exact match
                                  example: exclude-value
                                gt:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Greater than - for numbers and dates
                                  example: 100
                                gte:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: >-
                                    Greater than or equal - for numbers and
                                    dates
                                  example: 100
                                lt:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Less than - for numbers and dates
                                  example: 50
                                lte:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Less than or equal - for numbers and dates
                                  example: 50
                                between:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: number
                                      - type: string
                                  minItems: 2
                                  maxItems: 2
                                  description: >-
                                    Between two values [min, max] - for numbers
                                    and dates
                                  example:
                                    - 10
                                    - 100
                                in:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                  description: Value is in the provided array
                                  example:
                                    - value1
                                    - value2
                                    - value3
                                nin:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                  description: Value is not in the provided array
                                  example:
                                    - exclude1
                                    - exclude2
                                startsWith:
                                  type: string
                                  description: String starts with the provided value
                                  example: prefix
                                inference_task_executions:
                                  type: object
                                  additionalProperties:
                                    type: string
                                    format: uuid
                                  default: {}
                                endsWith:
                                  type: string
                                  description: String ends with the provided value
                                  example: suffix
                                contains:
                                  type: string
                                  description: String contains the provided value
                                  example: substring
                                exists:
                                  type: boolean
                                  description: >-
                                    Field exists (true) or does not exist
                                    (false)
                                  example: true
                                isNull:
                                  type: boolean
                                  description: Field is null (true) or is not null (false)
                                  example: false
                                isNotNull:
                                  type: boolean
                                  description: Field is not null (true) or is null (false)
                                  example: true
                              additionalProperties: false
                              description: Advanced filter operators for complex queries
                          description: Filter by creation date
                        updatedAt:
                          anyOf:
                            - type: string
                              description: Simple string match value
                              example: example-value
                            - type: number
                              description: Simple number match value
                              example: 42
                            - type: boolean
                              description: Simple boolean match value
                              example: true
                            - type: object
                              properties:
                                eq:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                  description: Equals - exact match
                                  example: exact-value
                                ne:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                  description: Not equals - exclude exact match
                                  example: exclude-value
                                gt:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Greater than - for numbers and dates
                                  example: 100
                                gte:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: >-
                                    Greater than or equal - for numbers and
                                    dates
                                  example: 100
                                lt:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Less than - for numbers and dates
                                  example: 50
                                lte:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Less than or equal - for numbers and dates
                                  example: 50
                                between:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: number
                                      - type: string
                                  minItems: 2
                                  maxItems: 2
                                  description: >-
                                    Between two values [min, max] - for numbers
                                    and dates
                                  example:
                                    - 10
                                    - 100
                                in:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                  description: Value is in the provided array
                                  example:
                                    - value1
                                    - value2
                                    - value3
                                nin:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                  description: Value is not in the provided array
                                  example:
                                    - exclude1
                                    - exclude2
                                startsWith:
                                  type: string
                                  description: String starts with the provided value
                                  example: prefix
                                inference_task_executions:
                                  type: object
                                  additionalProperties:
                                    type: string
                                    format: uuid
                                  default: {}
                                endsWith:
                                  type: string
                                  description: String ends with the provided value
                                  example: suffix
                                contains:
                                  type: string
                                  description: String contains the provided value
                                  example: substring
                                exists:
                                  type: boolean
                                  description: >-
                                    Field exists (true) or does not exist
                                    (false)
                                  example: true
                                isNull:
                                  type: boolean
                                  description: Field is null (true) or is not null (false)
                                  example: false
                                isNotNull:
                                  type: boolean
                                  description: Field is not null (true) or is null (false)
                                  example: true
                              additionalProperties: false
                              description: Advanced filter operators for complex queries
                          description: Filter by last update date
                        metadata:
                          type: object
                          additionalProperties:
                            anyOf:
                              - type: string
                                description: Simple string match value
                                example: example-value
                              - type: number
                                description: Simple number match value
                                example: 42
                              - type: boolean
                                description: Simple boolean match value
                                example: true
                              - type: object
                                properties:
                                  eq:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                    description: Equals - exact match
                                    example: exact-value
                                  ne:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                    description: Not equals - exclude exact match
                                    example: exclude-value
                                  gt:
                                    anyOf:
                                      - type: number
                                      - type: string
                                    description: Greater than - for numbers and dates
                                    example: 100
                                  gte:
                                    anyOf:
                                      - type: number
                                      - type: string
                                    description: >-
                                      Greater than or equal - for numbers and
                                      dates
                                    example: 100
                                  lt:
                                    anyOf:
                                      - type: number
                                      - type: string
                                    description: Less than - for numbers and dates
                                    example: 50
                                  lte:
                                    anyOf:
                                      - type: number
                                      - type: string
                                    description: Less than or equal - for numbers and dates
                                    example: 50
                                  between:
                                    type: array
                                    items:
                                      anyOf:
                                        - type: number
                                        - type: string
                                    minItems: 2
                                    maxItems: 2
                                    description: >-
                                      Between two values [min, max] - for
                                      numbers and dates
                                    example:
                                      - 10
                                      - 100
                                  in:
                                    type: array
                                    items:
                                      anyOf:
                                        - type: string
                                        - type: number
                                        - type: boolean
                                    description: Value is in the provided array
                                    example:
                                      - value1
                                      - value2
                                      - value3
                                  nin:
                                    type: array
                                    items:
                                      anyOf:
                                        - type: string
                                        - type: number
                                        - type: boolean
                                    description: Value is not in the provided array
                                    example:
                                      - exclude1
                                      - exclude2
                                  startsWith:
                                    type: string
                                    description: String starts with the provided value
                                    example: prefix
                                  inference_task_executions:
                                    type: object
                                    additionalProperties:
                                      type: string
                                      format: uuid
                                    default: {}
                                  endsWith:
                                    type: string
                                    description: String ends with the provided value
                                    example: suffix
                                  contains:
                                    type: string
                                    description: String contains the provided value
                                    example: substring
                                  exists:
                                    type: boolean
                                    description: >-
                                      Field exists (true) or does not exist
                                      (false)
                                    example: true
                                  isNull:
                                    type: boolean
                                    description: >-
                                      Field is null (true) or is not null
                                      (false)
                                    example: false
                                  isNotNull:
                                    type: boolean
                                    description: >-
                                      Field is not null (true) or is null
                                      (false)
                                    example: true
                                additionalProperties: false
                                description: Advanced filter operators for complex queries
                            description: >-
                              Filter value - can be a simple value for exact
                              match or an object with operators
                          description: >-
                            Filter by metadata fields - key-value pairs where
                            values can use advanced operators
                      additionalProperties: false
                      description: Filters to apply when selecting content for querying
                    libraries:
                      type: array
                      items:
                        type: string
                        format: uuid
                      description: Array of library IDs to include in search context
                      example:
                        - 01234567-89ab-cdef-0123-456789abcdef
                    includeWebSearchResults:
                      type: boolean
                      default: false
                      description: >-
                        Whether to include web search results in addition to
                        local document search. Default is false.
                      example: false
                  additionalProperties: false
                  description: >-
                    Optional context configuration for content sources and
                    filters
              required:
                - query
              additionalProperties: false
              description: >-
                Request body for querying content using AI assistant with vector
                store
      responses:
        '200':
          description: Successfully queried content using AI assistant
          content:
            application/json:
              schema:
                type: object
                properties:
                  query:
                    type: string
                    description: The original query that was asked
                    example: What are the main themes discussed in these documents?
                  response:
                    type: string
                    description: The AI assistant's response to the query
                    example: >-
                      Based on the documents in your collection, the main themes
                      include...
                  analyzedDocumentCount:
                    type: integer
                    description: >-
                      Number of documents that were analyzed and available for
                      querying
                    example: 15
                  citedContent:
                    type: array
                    items:
                      type: object
                      properties:
                        contentId:
                          type: string
                          format: uuid
                          description: Unique identifier for the content item
                          example: 123e4567-e89b-12d3-a456-426614174000
                        dataspaceId:
                          type: string
                          pattern: ^sds-[a-z0-9]{8}$
                          description: Short dataspace ID with sds- prefix
                          example: sds-abc12345
                        fileName:
                          type: string
                          description: Name of the uploaded file
                          example: document.pdf
                        fileFormat:
                          type: string
                          description: MIME type of the file
                          example: application/pdf
                        createdAt:
                          type: string
                          format: date-time
                          description: ISO timestamp when the content was created
                          example: '2024-01-15T10:30:00Z'
                        updatedAt:
                          type: string
                          format: date-time
                          description: ISO timestamp when the content was last updated
                          example: '2024-01-15T14:30:00Z'
                        categoryId:
                          type: string
                          nullable: true
                          format: uuid
                          description: UUID of the category this content belongs to
                          example: 123e4567-e89b-12d3-a456-426614174001
                        metadata:
                          type: object
                          nullable: true
                          properties: {}
                          description: Optional metadata for the content item
                          example:
                            author: John Doe
                            version: 1
                            published: true
                        inferenceTaskExecutions:
                          type: object
                          nullable: true
                          additionalProperties:
                            type: string
                            format: uuid
                          description: >-
                            Record of inference task executions that modified
                            this content, mapping inference type to task
                            execution ID
                          example:
                            categoryId: 789e0123-e89b-12d3-a456-426614174002
                        versionString:
                          type: string
                          nullable: true
                          description: >-
                            Version identifier based on category and unique
                            metadata
                          example: research_v2_final
                        fileUrl:
                          type: string
                          nullable: true
                          format: uri
                          description: Public URL to access the file
                          example: >-
                            https://api.example.com/files/sds-abc12345/content/123e4567-e89b-12d3-a456-426614174000/document.pdf
                        fileSize:
                          type: integer
                          nullable: true
                          description: Size of the file in bytes
                          example: 2048576
                        taskExecutionDetails:
                          type: object
                          nullable: true
                          additionalProperties:
                            type: object
                            properties: {}
                          description: Detailed information about task executions
                          example:
                            categoryId:
                              status: completed
                              confidence: high
                        relatedVersions:
                          type: array
                          nullable: true
                          items:
                            type: object
                            properties: {}
                          description: Related content items with the same version string
                          example: []
                        citationNumber:
                          type: integer
                          minimum: 1
                          description: >-
                            Citation number used in the AI response (e.g., [1],
                            [2], etc.)
                          example: 1
                      required:
                        - contentId
                        - dataspaceId
                        - fileName
                        - fileFormat
                        - createdAt
                        - updatedAt
                    description: >-
                      Array of content items that were cited in the AI response,
                      including citation numbers
                    example: []
                  webSearchResults:
                    type: array
                    items:
                      type: object
                      properties:
                        title:
                          type: string
                          description: Title of the web search result
                          example: Sample Article Title
                        url:
                          type: string
                          format: uri
                          description: URL of the web search result
                          example: https://example.com/article
                        snippet:
                          type: string
                          description: Snippet/preview text from the web search result
                          example: This article discusses...
                        relevanceScore:
                          type: number
                          minimum: 0
                          maximum: 1
                          description: Relevance score from 0 to 1
                          example: 0.85
                        citationNumber:
                          type: integer
                          minimum: 1
                          description: >-
                            Citation number used in the AI response (e.g.,
                            [100], [101], etc.)
                          example: 100
                      required:
                        - title
                        - url
                        - snippet
                        - relevanceScore
                      description: Web search result from external search providers
                    description: >-
                      Array of web search results that were included in the AI
                      response
                    example: []
                  citedLibraryPages:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: Unique identifier for the source file
                          example: 01234567-89ab-cdef-0123-456789abcdef
                        libraryId:
                          type: string
                          format: uuid
                          description: ID of the library this page belongs to
                          example: 01234567-89ab-cdef-0123-456789abcdef
                        url:
                          type: string
                          format: uri
                          description: URL of the original web page
                          example: https://example.com/page
                        title:
                          type: string
                          description: Title of the web page
                          example: Example Page Title
                        domain:
                          type: string
                          description: Domain of the web page
                          example: example.com
                        contentType:
                          type: string
                          description: Content type of the page
                          example: text/html
                        scrapedAt:
                          type: string
                          description: When the page was scraped
                          example: '2024-01-01T00:00:00Z'
                        relevanceScore:
                          type: number
                          minimum: 0
                          maximum: 1
                          description: Relevance score for this citation
                          example: 0.92
                        citationNumber:
                          type: integer
                          minimum: 1
                          description: Citation number used in the AI response
                          example: 2
                      required:
                        - id
                        - libraryId
                        - url
                      description: Library page citation information
                    description: Array of library pages that were cited in the AI response
                    example: []
                required:
                  - query
                  - response
                  - analyzedDocumentCount
                  - citedContent
                  - webSearchResults
                  - citedLibraryPages
                description: Response from the AI assistant query
        '400':
          description: Invalid request parameters or filters
        '404':
          description: Dataspace not found, no vector store available, or agent not found
        '500':
          description: Internal server error during AI query processing
  /query-logs/{queryLogId}:
    get:
      operationId: getQueryLogById
      summary: Get a single query log by ID
      description: >-
        Retrieves a specific query log record by its unique identifier. Useful
        for examining the details of a particular API operation that was logged.
      tags:
        - Query Logs
      security:
        - bearerAuth: []
      parameters:
        - schema:
            $ref: '#/components/schemas/QueryLogItemParams'
          required: true
          description: The unique UUID of the query log to retrieve
          name: queryLogId
          in: path
      responses:
        '200':
          description: Query log retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryLogResponse'
        '401':
          description: Unauthorized - Invalid or missing authentication token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Unauthorized - No credentials provided
        '404':
          description: Query log not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: >-
                      Query log with ID 01234567-89ab-cdef-0123-456789abcdef not
                      found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Internal server error
  /query-logs:
    get:
      operationId: getQueryLogs
      summary: Get paginated list of query logs with filtering
      description: >-
        Retrieves a paginated list of query log records with optional filtering.

        **Key Features:** - **Cursor-based pagination** with `pageSize` and
        `cursor` - **Multiple filter options** to narrow down results -
        **Operation tracking** - see all API operations performed on content -
        **Audit trail** - complete history of who did what and when

        **Common Use Cases:** - Track content operations by a specific user -
        Monitor operations on a particular dataspace - Audit trail for
        compliance and debugging - Performance analysis of API usage

        **Filter Examples:** - Get all CREATE operations:
        `?operationType=CREATE` - Get operations by user: `?userId=scd-dev00001`
        - Get operations in date range:
        `?dateFrom=2025-06-10T00:00:00Z&dateTo=2025-06-10T23:59:59Z` - Get
        operations on specific content:
        `?contentId=98765432-1abc-def0-1234-56789abcdef0` 
      tags:
        - Query Logs
      security:
        - bearerAuth: []
      parameters:
        - schema:
            $ref: '#/components/schemas/PageSize'
          required: false
          description: Number of items per page
          name: pageSize
          in: query
        - schema:
            $ref: '#/components/schemas/Cursor'
          required: false
          description: Cursor for pagination
          name: cursor
          in: query
        - schema:
            allOf:
              - $ref: '#/components/schemas/OperationType'
              - description: Filter by operation type
          required: false
          description: Filter by operation type
          name: operationType
          in: query
        - schema:
            allOf:
              - $ref: '#/components/schemas/UserId'
              - description: Filter by user ID
          required: false
          description: Filter by user ID
          name: userId
          in: query
        - schema:
            allOf:
              - $ref: '#/components/schemas/ContentId'
              - description: Filter by content ID
          required: false
          description: Filter by content ID
          name: contentId
          in: query
        - schema:
            allOf:
              - $ref: '#/components/schemas/DataspaceId'
              - description: Filter by dataspace ID
          required: false
          description: Filter by dataspace ID
          name: dataspaceId
          in: query
        - schema:
            allOf:
              - $ref: '#/components/schemas/OperationSource'
              - description: Filter by operation source
          required: false
          description: Filter by operation source
          name: operationSource
          in: query
        - schema:
            allOf:
              - $ref: '#/components/schemas/ParentId'
              - description: Filter by parent query log ID
          required: false
          description: Filter by parent query log ID
          name: parentId
          in: query
        - schema:
            $ref: '#/components/schemas/DateFrom'
          required: false
          description: Filter by date range start
          name: dateFrom
          in: query
        - schema:
            $ref: '#/components/schemas/DateTo'
          required: false
          description: Filter by date range end
          name: dateTo
          in: query
      responses:
        '200':
          description: Query logs retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FetchQueryLogsResponse'
        '400':
          description: Bad request - Invalid query parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid query parameters
                  details:
                    type: object
                    example:
                      pageSize: Must be between 1 and 100
                      dateFrom: Must be a valid ISO datetime string
        '401':
          description: Unauthorized - Invalid or missing authentication token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Unauthorized - No credentials provided
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Internal server error
  /workflow-executions:
    get:
      operationId: listWorkflowExecutions
      tags:
        - Workflow Executions
      summary: List workflow executions
      description: >-
        Returns a paginated list of workflow executions. Supports filtering by
        dataspace ID, status, workflow ID, and content ID. Since workflow
        executions are stored at the workspace level, dataspace filtering is
        optional.
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Optional filter by dataspace ID
            example: sds-abc12345
          required: false
          description: Optional filter by dataspace ID
          name: primaryScopeDataspaceId
          in: query
        - schema:
            type: string
            enum:
              - started
              - completed
              - failed
            description: Filter by execution status
            example: completed
          required: false
          description: Filter by execution status
          name: status
          in: query
        - schema:
            type: string
            format: uuid
            description: Filter by workflow ID
            example: 987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b
          required: false
          description: Filter by workflow ID
          name: workflowId
          in: query
        - schema:
            type: string
            format: uuid
            description: Filter by primary scope object ID
            example: 456e7890-e89b-12d3-a456-426614174001
          required: false
          description: Filter by primary scope object ID
          name: primaryScopeObjectId
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
            description: Number of items to return
            example: 20
          required: false
          description: Number of items to return
          name: limit
          in: query
        - schema:
            type: integer
            nullable: true
            minimum: 0
            default: 0
            description: Number of items to skip
            example: 0
          required: false
          description: Number of items to skip
          name: offset
          in: query
      responses:
        '200':
          description: List of workflow executions retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          example: 123e4567-e89b-12d3-a456-426614174000
                        workflowId:
                          type: string
                          format: uuid
                          example: 987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b
                        primaryScopeObjectId:
                          type: string
                          format: uuid
                          example: 456e7890-e89b-12d3-a456-426614174001
                        primaryScopeDataspaceId:
                          type: string
                          pattern: ^sds-[a-z0-9]{8}$
                          description: Short dataspace ID with sds- prefix
                          example: sds-abc12345
                        status:
                          type: string
                          enum:
                            - started
                            - completed
                            - failed
                          example: completed
                        startedAt:
                          type: string
                          format: date-time
                          example: '2025-01-15T10:30:00Z'
                        completedAt:
                          type: string
                          nullable: true
                          format: date-time
                          example: '2025-01-15T10:35:00Z'
                        errorMessage:
                          type: string
                          nullable: true
                          example: Workflow execution failed at step 3
                      required:
                        - id
                        - workflowId
                        - primaryScopeObjectId
                        - primaryScopeDataspaceId
                        - status
                        - startedAt
                        - completedAt
                        - errorMessage
                  totalCount:
                    type: integer
                    minimum: 0
                    example: 42
                  limit:
                    type: integer
                    minimum: 1
                    example: 20
                  offset:
                    type: integer
                    minimum: 0
                    example: 0
                required:
                  - items
                  - totalCount
                  - limit
                  - offset
              example:
                items:
                  - id: 123e4567-e89b-12d3-a456-426614174000
                    workflowId: 987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b
                    primaryScopeObjectId: 456e7890-e89b-12d3-a456-426614174001
                    primaryScopeDataspaceId: sds-abc12345
                    status: completed
                    startedAt: '2025-01-15T10:30:00Z'
                    completedAt: '2025-01-15T10:35:00Z'
                    errorMessage: null
                  - id: 234e5678-e89b-12d3-a456-426614174001
                    workflowId: 987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b
                    primaryScopeObjectId: 567e8901-e89b-12d3-a456-426614174002
                    primaryScopeDataspaceId: sds-def67890
                    status: started
                    startedAt: '2025-01-15T11:00:00Z'
                    completedAt: null
                    errorMessage: null
                totalCount: 2
                limit: 20
                offset: 0
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  message:
                    type: string
                    example: Authentication required
                required:
                  - error
                  - message
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: An unexpected error occurred
                required:
                  - error
                  - message
  /workflow-executions/{workflowExecutionId}:
    get:
      operationId: getWorkflowExecutionById
      tags:
        - Workflow Executions
      summary: Get workflow execution by ID
      description: >-
        Returns detailed information about a specific workflow execution,
        including all associated TaskExecution objects that represent the
        individual tasks that were executed as part of this workflow.
      parameters:
        - schema:
            type: string
            format: uuid
            description: UUID of the workflow execution
            example: 123e4567-e89b-12d3-a456-426614174000
          required: true
          description: UUID of the workflow execution
          name: workflowExecutionId
          in: path
      responses:
        '200':
          description: Workflow execution details retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    example: 123e4567-e89b-12d3-a456-426614174000
                  workflowId:
                    type: string
                    format: uuid
                    example: 987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b
                  primaryScopeObjectId:
                    type: string
                    format: uuid
                    example: 456e7890-e89b-12d3-a456-426614174001
                  primaryScopeDataspaceId:
                    type: string
                    pattern: ^sds-[a-z0-9]{8}$
                    description: Short dataspace ID with sds- prefix
                    example: sds-abc12345
                  status:
                    type: string
                    enum:
                      - started
                      - completed
                      - failed
                    example: completed
                  startedAt:
                    type: string
                    format: date-time
                    example: '2025-01-15T10:30:00Z'
                  completedAt:
                    type: string
                    nullable: true
                    format: date-time
                    example: '2025-01-15T10:35:00Z'
                  errorMessage:
                    type: string
                    nullable: true
                    example: Workflow execution failed at step 3
                  taskExecutions:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          example: 789e0123-e89b-12d3-a456-426614174002
                        workflowExecutionId:
                          type: string
                          format: uuid
                          example: 123e4567-e89b-12d3-a456-426614174000
                        taskDefinitionId:
                          type: string
                          format: uuid
                          example: abc1234d-e89b-12d3-a456-426614174003
                        taskName:
                          type: string
                          example: Categorize Document
                        primaryScopeObjectId:
                          type: string
                          format: uuid
                          example: 456e7890-e89b-12d3-a456-426614174001
                        primaryScopeDataspaceId:
                          type: string
                          pattern: ^sds-[a-z0-9]{8}$
                          description: Short dataspace ID with sds- prefix
                          example: sds-abc12345
                        status:
                          type: string
                          enum:
                            - started
                            - completed
                            - failed
                          example: completed
                        startedAt:
                          type: string
                          format: date-time
                          example: '2025-01-15T10:30:30Z'
                        completedAt:
                          type: string
                          nullable: true
                          format: date-time
                          example: '2025-01-15T10:32:00Z'
                        errorMessage:
                          type: string
                          nullable: true
                          example: Task failed due to invalid input format
                      required:
                        - id
                        - workflowExecutionId
                        - taskDefinitionId
                        - taskName
                        - primaryScopeObjectId
                        - primaryScopeDataspaceId
                        - status
                        - startedAt
                        - completedAt
                        - errorMessage
                    description: List of task executions within this workflow execution
                    example: []
                required:
                  - id
                  - workflowId
                  - primaryScopeObjectId
                  - primaryScopeDataspaceId
                  - status
                  - startedAt
                  - completedAt
                  - errorMessage
                  - taskExecutions
              example:
                id: 123e4567-e89b-12d3-a456-426614174000
                workflowId: 987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b
                primaryScopeObjectId: 456e7890-e89b-12d3-a456-426614174001
                primaryScopeDataspaceId: sds-abc12345
                status: completed
                startedAt: '2025-01-15T10:30:00Z'
                completedAt: '2025-01-15T10:35:00Z'
                errorMessage: null
                taskExecutions:
                  - id: 789e0123-e89b-12d3-a456-426614174002
                    workflowExecutionId: 123e4567-e89b-12d3-a456-426614174000
                    taskDefinitionId: abc1234d-e89b-12d3-a456-426614174003
                    taskName: Categorize Document
                    primaryScopeObjectId: 456e7890-e89b-12d3-a456-426614174001
                    primaryScopeDataspaceId: sds-abc12345
                    status: completed
                    startedAt: '2025-01-15T10:30:30Z'
                    completedAt: '2025-01-15T10:32:00Z'
                    errorMessage: null
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  message:
                    type: string
                    example: Authentication required
                required:
                  - error
                  - message
        '404':
          description: Workflow execution not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Not Found
                  message:
                    type: string
                    example: Resource not found
                required:
                  - error
                  - message
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: An unexpected error occurred
                required:
                  - error
                  - message
  /batch-workflow-executions:
    post:
      operationId: createBatchWorkflowExecution
      tags:
        - Batch Workflow Executions
      summary: Create and execute batch workflow
      description: >-
        Creates a batch workflow execution that discovers content across
        multiple dataspaces using the provided filters, then executes the
        specified workflow on each matching content item. The system
        automatically selects the first available agent for the user's account
        to execute the workflow tasks. The workflow execution reuses the
        existing single-content workflow logic. Returns immediately with a batch
        execution record while processing continues in the background.

        **File Format Filters:** The API supports both user-friendly file types
        and MIME types for filtering: - **User-friendly**: `{ "in": ["pdf",
        "docx", "xlsx"] }` - **MIME types**: `{ "in": ["application/pdf",
        "application/vnd.openxmlformats-officedocument.wordprocessingml.document"]
        }`

        Supported user-friendly file types: pdf, docx, xlsx, pptx, txt, doc,
        xls, ppt, json, xml, csv, html, css, js, jpg, jpeg, png, gif, bmp, svg,
        webp, tiff, mp4, avi, mov, wmv, flv, webm, mkv, mp3, wav, flac, aac,
        ogg, m4a, zip, rar, 7z, tar, gz, bz2.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: object
                  properties:
                    contentId:
                      anyOf:
                        - type: string
                          description: Simple string match value
                          example: example-value
                        - type: number
                          description: Simple number match value
                          example: 42
                        - type: boolean
                          description: Simple boolean match value
                          example: true
                        - type: object
                          properties:
                            eq:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Equals - exact match
                              example: exact-value
                            ne:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Not equals - exclude exact match
                              example: exclude-value
                            gt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than - for numbers and dates
                              example: 100
                            gte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than or equal - for numbers and dates
                              example: 100
                            lt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than - for numbers and dates
                              example: 50
                            lte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than or equal - for numbers and dates
                              example: 50
                            between:
                              type: array
                              items:
                                anyOf:
                                  - type: number
                                  - type: string
                              minItems: 2
                              maxItems: 2
                              description: >-
                                Between two values [min, max] - for numbers and
                                dates
                              example:
                                - 10
                                - 100
                            in:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is in the provided array
                              example:
                                - value1
                                - value2
                                - value3
                            nin:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is not in the provided array
                              example:
                                - exclude1
                                - exclude2
                            startsWith:
                              type: string
                              description: String starts with the provided value
                              example: prefix
                            inference_task_executions:
                              type: object
                              additionalProperties:
                                type: string
                                format: uuid
                              default: {}
                            endsWith:
                              type: string
                              description: String ends with the provided value
                              example: suffix
                            contains:
                              type: string
                              description: String contains the provided value
                              example: substring
                            exists:
                              type: boolean
                              description: Field exists (true) or does not exist (false)
                              example: true
                            isNull:
                              type: boolean
                              description: Field is null (true) or is not null (false)
                              example: false
                            isNotNull:
                              type: boolean
                              description: Field is not null (true) or is null (false)
                              example: true
                          additionalProperties: false
                          description: Advanced filter operators for complex queries
                      description: Filter by content ID
                    categoryId:
                      anyOf:
                        - type: string
                          description: Simple string match value
                          example: example-value
                        - type: number
                          description: Simple number match value
                          example: 42
                        - type: boolean
                          description: Simple boolean match value
                          example: true
                        - type: object
                          properties:
                            eq:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Equals - exact match
                              example: exact-value
                            ne:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Not equals - exclude exact match
                              example: exclude-value
                            gt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than - for numbers and dates
                              example: 100
                            gte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than or equal - for numbers and dates
                              example: 100
                            lt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than - for numbers and dates
                              example: 50
                            lte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than or equal - for numbers and dates
                              example: 50
                            between:
                              type: array
                              items:
                                anyOf:
                                  - type: number
                                  - type: string
                              minItems: 2
                              maxItems: 2
                              description: >-
                                Between two values [min, max] - for numbers and
                                dates
                              example:
                                - 10
                                - 100
                            in:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is in the provided array
                              example:
                                - value1
                                - value2
                                - value3
                            nin:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is not in the provided array
                              example:
                                - exclude1
                                - exclude2
                            startsWith:
                              type: string
                              description: String starts with the provided value
                              example: prefix
                            inference_task_executions:
                              type: object
                              additionalProperties:
                                type: string
                                format: uuid
                              default: {}
                            endsWith:
                              type: string
                              description: String ends with the provided value
                              example: suffix
                            contains:
                              type: string
                              description: String contains the provided value
                              example: substring
                            exists:
                              type: boolean
                              description: Field exists (true) or does not exist (false)
                              example: true
                            isNull:
                              type: boolean
                              description: Field is null (true) or is not null (false)
                              example: false
                            isNotNull:
                              type: boolean
                              description: Field is not null (true) or is null (false)
                              example: true
                          additionalProperties: false
                          description: Advanced filter operators for complex queries
                      description: Filter by category ID
                    fileName:
                      anyOf:
                        - type: string
                          description: Simple string match value
                          example: example-value
                        - type: number
                          description: Simple number match value
                          example: 42
                        - type: boolean
                          description: Simple boolean match value
                          example: true
                        - type: object
                          properties:
                            eq:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Equals - exact match
                              example: exact-value
                            ne:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Not equals - exclude exact match
                              example: exclude-value
                            gt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than - for numbers and dates
                              example: 100
                            gte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than or equal - for numbers and dates
                              example: 100
                            lt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than - for numbers and dates
                              example: 50
                            lte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than or equal - for numbers and dates
                              example: 50
                            between:
                              type: array
                              items:
                                anyOf:
                                  - type: number
                                  - type: string
                              minItems: 2
                              maxItems: 2
                              description: >-
                                Between two values [min, max] - for numbers and
                                dates
                              example:
                                - 10
                                - 100
                            in:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is in the provided array
                              example:
                                - value1
                                - value2
                                - value3
                            nin:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is not in the provided array
                              example:
                                - exclude1
                                - exclude2
                            startsWith:
                              type: string
                              description: String starts with the provided value
                              example: prefix
                            inference_task_executions:
                              type: object
                              additionalProperties:
                                type: string
                                format: uuid
                              default: {}
                            endsWith:
                              type: string
                              description: String ends with the provided value
                              example: suffix
                            contains:
                              type: string
                              description: String contains the provided value
                              example: substring
                            exists:
                              type: boolean
                              description: Field exists (true) or does not exist (false)
                              example: true
                            isNull:
                              type: boolean
                              description: Field is null (true) or is not null (false)
                              example: false
                            isNotNull:
                              type: boolean
                              description: Field is not null (true) or is null (false)
                              example: true
                          additionalProperties: false
                          description: Advanced filter operators for complex queries
                      description: Filter by file name
                    fileFormat:
                      anyOf:
                        - type: string
                          description: Simple string match value
                          example: example-value
                        - type: number
                          description: Simple number match value
                          example: 42
                        - type: boolean
                          description: Simple boolean match value
                          example: true
                        - type: object
                          properties:
                            eq:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Equals - exact match
                              example: exact-value
                            ne:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Not equals - exclude exact match
                              example: exclude-value
                            gt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than - for numbers and dates
                              example: 100
                            gte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than or equal - for numbers and dates
                              example: 100
                            lt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than - for numbers and dates
                              example: 50
                            lte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than or equal - for numbers and dates
                              example: 50
                            between:
                              type: array
                              items:
                                anyOf:
                                  - type: number
                                  - type: string
                              minItems: 2
                              maxItems: 2
                              description: >-
                                Between two values [min, max] - for numbers and
                                dates
                              example:
                                - 10
                                - 100
                            in:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is in the provided array
                              example:
                                - value1
                                - value2
                                - value3
                            nin:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is not in the provided array
                              example:
                                - exclude1
                                - exclude2
                            startsWith:
                              type: string
                              description: String starts with the provided value
                              example: prefix
                            inference_task_executions:
                              type: object
                              additionalProperties:
                                type: string
                                format: uuid
                              default: {}
                            endsWith:
                              type: string
                              description: String ends with the provided value
                              example: suffix
                            contains:
                              type: string
                              description: String contains the provided value
                              example: substring
                            exists:
                              type: boolean
                              description: Field exists (true) or does not exist (false)
                              example: true
                            isNull:
                              type: boolean
                              description: Field is null (true) or is not null (false)
                              example: false
                            isNotNull:
                              type: boolean
                              description: Field is not null (true) or is null (false)
                              example: true
                          additionalProperties: false
                          description: Advanced filter operators for complex queries
                      description: Filter by file format/MIME type
                    createdAt:
                      anyOf:
                        - type: string
                          description: Simple string match value
                          example: example-value
                        - type: number
                          description: Simple number match value
                          example: 42
                        - type: boolean
                          description: Simple boolean match value
                          example: true
                        - type: object
                          properties:
                            eq:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Equals - exact match
                              example: exact-value
                            ne:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Not equals - exclude exact match
                              example: exclude-value
                            gt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than - for numbers and dates
                              example: 100
                            gte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than or equal - for numbers and dates
                              example: 100
                            lt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than - for numbers and dates
                              example: 50
                            lte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than or equal - for numbers and dates
                              example: 50
                            between:
                              type: array
                              items:
                                anyOf:
                                  - type: number
                                  - type: string
                              minItems: 2
                              maxItems: 2
                              description: >-
                                Between two values [min, max] - for numbers and
                                dates
                              example:
                                - 10
                                - 100
                            in:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is in the provided array
                              example:
                                - value1
                                - value2
                                - value3
                            nin:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is not in the provided array
                              example:
                                - exclude1
                                - exclude2
                            startsWith:
                              type: string
                              description: String starts with the provided value
                              example: prefix
                            inference_task_executions:
                              type: object
                              additionalProperties:
                                type: string
                                format: uuid
                              default: {}
                            endsWith:
                              type: string
                              description: String ends with the provided value
                              example: suffix
                            contains:
                              type: string
                              description: String contains the provided value
                              example: substring
                            exists:
                              type: boolean
                              description: Field exists (true) or does not exist (false)
                              example: true
                            isNull:
                              type: boolean
                              description: Field is null (true) or is not null (false)
                              example: false
                            isNotNull:
                              type: boolean
                              description: Field is not null (true) or is null (false)
                              example: true
                          additionalProperties: false
                          description: Advanced filter operators for complex queries
                      description: Filter by creation date
                    updatedAt:
                      anyOf:
                        - type: string
                          description: Simple string match value
                          example: example-value
                        - type: number
                          description: Simple number match value
                          example: 42
                        - type: boolean
                          description: Simple boolean match value
                          example: true
                        - type: object
                          properties:
                            eq:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Equals - exact match
                              example: exact-value
                            ne:
                              anyOf:
                                - type: string
                                - type: number
                                - type: boolean
                              description: Not equals - exclude exact match
                              example: exclude-value
                            gt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than - for numbers and dates
                              example: 100
                            gte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Greater than or equal - for numbers and dates
                              example: 100
                            lt:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than - for numbers and dates
                              example: 50
                            lte:
                              anyOf:
                                - type: number
                                - type: string
                              description: Less than or equal - for numbers and dates
                              example: 50
                            between:
                              type: array
                              items:
                                anyOf:
                                  - type: number
                                  - type: string
                              minItems: 2
                              maxItems: 2
                              description: >-
                                Between two values [min, max] - for numbers and
                                dates
                              example:
                                - 10
                                - 100
                            in:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is in the provided array
                              example:
                                - value1
                                - value2
                                - value3
                            nin:
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                              description: Value is not in the provided array
                              example:
                                - exclude1
                                - exclude2
                            startsWith:
                              type: string
                              description: String starts with the provided value
                              example: prefix
                            inference_task_executions:
                              type: object
                              additionalProperties:
                                type: string
                                format: uuid
                              default: {}
                            endsWith:
                              type: string
                              description: String ends with the provided value
                              example: suffix
                            contains:
                              type: string
                              description: String contains the provided value
                              example: substring
                            exists:
                              type: boolean
                              description: Field exists (true) or does not exist (false)
                              example: true
                            isNull:
                              type: boolean
                              description: Field is null (true) or is not null (false)
                              example: false
                            isNotNull:
                              type: boolean
                              description: Field is not null (true) or is null (false)
                              example: true
                          additionalProperties: false
                          description: Advanced filter operators for complex queries
                      description: Filter by last update date
                    metadata:
                      type: object
                      additionalProperties:
                        anyOf:
                          - type: string
                            description: Simple string match value
                            example: example-value
                          - type: number
                            description: Simple number match value
                            example: 42
                          - type: boolean
                            description: Simple boolean match value
                            example: true
                          - type: object
                            properties:
                              eq:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                description: Equals - exact match
                                example: exact-value
                              ne:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                description: Not equals - exclude exact match
                                example: exclude-value
                              gt:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Greater than - for numbers and dates
                                example: 100
                              gte:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Greater than or equal - for numbers and dates
                                example: 100
                              lt:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Less than - for numbers and dates
                                example: 50
                              lte:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Less than or equal - for numbers and dates
                                example: 50
                              between:
                                type: array
                                items:
                                  anyOf:
                                    - type: number
                                    - type: string
                                minItems: 2
                                maxItems: 2
                                description: >-
                                  Between two values [min, max] - for numbers
                                  and dates
                                example:
                                  - 10
                                  - 100
                              in:
                                type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                description: Value is in the provided array
                                example:
                                  - value1
                                  - value2
                                  - value3
                              nin:
                                type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                description: Value is not in the provided array
                                example:
                                  - exclude1
                                  - exclude2
                              startsWith:
                                type: string
                                description: String starts with the provided value
                                example: prefix
                              inference_task_executions:
                                type: object
                                additionalProperties:
                                  type: string
                                  format: uuid
                                default: {}
                              endsWith:
                                type: string
                                description: String ends with the provided value
                                example: suffix
                              contains:
                                type: string
                                description: String contains the provided value
                                example: substring
                              exists:
                                type: boolean
                                description: Field exists (true) or does not exist (false)
                                example: true
                              isNull:
                                type: boolean
                                description: Field is null (true) or is not null (false)
                                example: false
                              isNotNull:
                                type: boolean
                                description: Field is not null (true) or is null (false)
                                example: true
                            additionalProperties: false
                            description: Advanced filter operators for complex queries
                        description: >-
                          Filter value - can be a simple value for exact match
                          or an object with operators
                      description: >-
                        Filter by metadata fields - key-value pairs where values
                        can use advanced operators
                  additionalProperties: false
                  description: Content search filters to find matching content items
                  example:
                    categoryId:
                      exists: false
                    fileFormat:
                      in:
                        - pdf
                        - docx
                    metadata:
                      author:
                        exists: true
                      status:
                        in:
                          - pending
                          - draft
                workflowId:
                  type: string
                  format: uuid
                  description: UUID of the workflow to execute on matching content
                  example: 987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b
                workspaceId:
                  type: string
                  pattern: ^sws-[a-z0-9]{8}$
                  description: Workspace ID where the batch execution should run
                  example: sws-abc12345
                scheduledAt:
                  type: string
                  format: date-time
                  description: >-
                    Optional scheduled execution time (ISO datetime string) -
                    not implemented yet
                  example: '2025-01-20T15:30:00Z'
                dataspaceIds:
                  type: array
                  items:
                    type: string
                    pattern: ^sds-[a-z0-9]{8}$
                  minItems: 1
                  description: Array of dataspace IDs where the workflow should run
                  example:
                    - sds-abc12345
                    - sds-def67890
              required:
                - workflowId
                - workspaceId
                - dataspaceIds
            examples:
              user-friendly-file-types:
                summary: Using user-friendly file types
                value:
                  query:
                    fileFormat:
                      in:
                        - pdf
                        - docx
                    metadata:
                      author:
                        exists: true
                      status:
                        in:
                          - pending
                          - draft
                    categoryId:
                      exists: false
                  workflowId: 987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b
                  workspaceId: sws-abc12345
                  dataspaceIds:
                    - sds-abc12345
                    - sds-def67890
                  scheduledAt: '2025-01-20T15:30:00Z'
              mime-types:
                summary: Using MIME types
                value:
                  query:
                    fileFormat:
                      in:
                        - application/pdf
                        - >-
                          application/vnd.openxmlformats-officedocument.wordprocessingml.document
                    metadata:
                      author:
                        exists: true
                      status:
                        in:
                          - pending
                          - draft
                    categoryId:
                      exists: false
                  workflowId: 987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b
                  workspaceId: sws-abc12345
                  dataspaceIds:
                    - sds-abc12345
                    - sds-def67890
                  scheduledAt: '2025-01-20T15:30:00Z'
      responses:
        '201':
          description: Batch workflow execution created and started successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: UUID of the batch workflow execution
                    example: 123e4567-e89b-12d3-a456-426614174000
                  query:
                    type: object
                    properties:
                      contentId:
                        anyOf:
                          - type: string
                            description: Simple string match value
                            example: example-value
                          - type: number
                            description: Simple number match value
                            example: 42
                          - type: boolean
                            description: Simple boolean match value
                            example: true
                          - type: object
                            properties:
                              eq:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                description: Equals - exact match
                                example: exact-value
                              ne:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                description: Not equals - exclude exact match
                                example: exclude-value
                              gt:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Greater than - for numbers and dates
                                example: 100
                              gte:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Greater than or equal - for numbers and dates
                                example: 100
                              lt:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Less than - for numbers and dates
                                example: 50
                              lte:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Less than or equal - for numbers and dates
                                example: 50
                              between:
                                type: array
                                items:
                                  anyOf:
                                    - type: number
                                    - type: string
                                minItems: 2
                                maxItems: 2
                                description: >-
                                  Between two values [min, max] - for numbers
                                  and dates
                                example:
                                  - 10
                                  - 100
                              in:
                                type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                description: Value is in the provided array
                                example:
                                  - value1
                                  - value2
                                  - value3
                              nin:
                                type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                description: Value is not in the provided array
                                example:
                                  - exclude1
                                  - exclude2
                              startsWith:
                                type: string
                                description: String starts with the provided value
                                example: prefix
                              inference_task_executions:
                                type: object
                                additionalProperties:
                                  type: string
                                  format: uuid
                                default: {}
                              endsWith:
                                type: string
                                description: String ends with the provided value
                                example: suffix
                              contains:
                                type: string
                                description: String contains the provided value
                                example: substring
                              exists:
                                type: boolean
                                description: Field exists (true) or does not exist (false)
                                example: true
                              isNull:
                                type: boolean
                                description: Field is null (true) or is not null (false)
                                example: false
                              isNotNull:
                                type: boolean
                                description: Field is not null (true) or is null (false)
                                example: true
                            additionalProperties: false
                            description: Advanced filter operators for complex queries
                        description: Filter by content ID
                      categoryId:
                        anyOf:
                          - type: string
                            description: Simple string match value
                            example: example-value
                          - type: number
                            description: Simple number match value
                            example: 42
                          - type: boolean
                            description: Simple boolean match value
                            example: true
                          - type: object
                            properties:
                              eq:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                description: Equals - exact match
                                example: exact-value
                              ne:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                description: Not equals - exclude exact match
                                example: exclude-value
                              gt:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Greater than - for numbers and dates
                                example: 100
                              gte:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Greater than or equal - for numbers and dates
                                example: 100
                              lt:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Less than - for numbers and dates
                                example: 50
                              lte:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Less than or equal - for numbers and dates
                                example: 50
                              between:
                                type: array
                                items:
                                  anyOf:
                                    - type: number
                                    - type: string
                                minItems: 2
                                maxItems: 2
                                description: >-
                                  Between two values [min, max] - for numbers
                                  and dates
                                example:
                                  - 10
                                  - 100
                              in:
                                type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                description: Value is in the provided array
                                example:
                                  - value1
                                  - value2
                                  - value3
                              nin:
                                type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                description: Value is not in the provided array
                                example:
                                  - exclude1
                                  - exclude2
                              startsWith:
                                type: string
                                description: String starts with the provided value
                                example: prefix
                              inference_task_executions:
                                type: object
                                additionalProperties:
                                  type: string
                                  format: uuid
                                default: {}
                              endsWith:
                                type: string
                                description: String ends with the provided value
                                example: suffix
                              contains:
                                type: string
                                description: String contains the provided value
                                example: substring
                              exists:
                                type: boolean
                                description: Field exists (true) or does not exist (false)
                                example: true
                              isNull:
                                type: boolean
                                description: Field is null (true) or is not null (false)
                                example: false
                              isNotNull:
                                type: boolean
                                description: Field is not null (true) or is null (false)
                                example: true
                            additionalProperties: false
                            description: Advanced filter operators for complex queries
                        description: Filter by category ID
                      fileName:
                        anyOf:
                          - type: string
                            description: Simple string match value
                            example: example-value
                          - type: number
                            description: Simple number match value
                            example: 42
                          - type: boolean
                            description: Simple boolean match value
                            example: true
                          - type: object
                            properties:
                              eq:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                description: Equals - exact match
                                example: exact-value
                              ne:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                description: Not equals - exclude exact match
                                example: exclude-value
                              gt:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Greater than - for numbers and dates
                                example: 100
                              gte:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Greater than or equal - for numbers and dates
                                example: 100
                              lt:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Less than - for numbers and dates
                                example: 50
                              lte:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Less than or equal - for numbers and dates
                                example: 50
                              between:
                                type: array
                                items:
                                  anyOf:
                                    - type: number
                                    - type: string
                                minItems: 2
                                maxItems: 2
                                description: >-
                                  Between two values [min, max] - for numbers
                                  and dates
                                example:
                                  - 10
                                  - 100
                              in:
                                type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                description: Value is in the provided array
                                example:
                                  - value1
                                  - value2
                                  - value3
                              nin:
                                type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                description: Value is not in the provided array
                                example:
                                  - exclude1
                                  - exclude2
                              startsWith:
                                type: string
                                description: String starts with the provided value
                                example: prefix
                              inference_task_executions:
                                type: object
                                additionalProperties:
                                  type: string
                                  format: uuid
                                default: {}
                              endsWith:
                                type: string
                                description: String ends with the provided value
                                example: suffix
                              contains:
                                type: string
                                description: String contains the provided value
                                example: substring
                              exists:
                                type: boolean
                                description: Field exists (true) or does not exist (false)
                                example: true
                              isNull:
                                type: boolean
                                description: Field is null (true) or is not null (false)
                                example: false
                              isNotNull:
                                type: boolean
                                description: Field is not null (true) or is null (false)
                                example: true
                            additionalProperties: false
                            description: Advanced filter operators for complex queries
                        description: Filter by file name
                      fileFormat:
                        anyOf:
                          - type: string
                            description: Simple string match value
                            example: example-value
                          - type: number
                            description: Simple number match value
                            example: 42
                          - type: boolean
                            description: Simple boolean match value
                            example: true
                          - type: object
                            properties:
                              eq:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                description: Equals - exact match
                                example: exact-value
                              ne:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                description: Not equals - exclude exact match
                                example: exclude-value
                              gt:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Greater than - for numbers and dates
                                example: 100
                              gte:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Greater than or equal - for numbers and dates
                                example: 100
                              lt:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Less than - for numbers and dates
                                example: 50
                              lte:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Less than or equal - for numbers and dates
                                example: 50
                              between:
                                type: array
                                items:
                                  anyOf:
                                    - type: number
                                    - type: string
                                minItems: 2
                                maxItems: 2
                                description: >-
                                  Between two values [min, max] - for numbers
                                  and dates
                                example:
                                  - 10
                                  - 100
                              in:
                                type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                description: Value is in the provided array
                                example:
                                  - value1
                                  - value2
                                  - value3
                              nin:
                                type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                description: Value is not in the provided array
                                example:
                                  - exclude1
                                  - exclude2
                              startsWith:
                                type: string
                                description: String starts with the provided value
                                example: prefix
                              inference_task_executions:
                                type: object
                                additionalProperties:
                                  type: string
                                  format: uuid
                                default: {}
                              endsWith:
                                type: string
                                description: String ends with the provided value
                                example: suffix
                              contains:
                                type: string
                                description: String contains the provided value
                                example: substring
                              exists:
                                type: boolean
                                description: Field exists (true) or does not exist (false)
                                example: true
                              isNull:
                                type: boolean
                                description: Field is null (true) or is not null (false)
                                example: false
                              isNotNull:
                                type: boolean
                                description: Field is not null (true) or is null (false)
                                example: true
                            additionalProperties: false
                            description: Advanced filter operators for complex queries
                        description: Filter by file format/MIME type
                      createdAt:
                        anyOf:
                          - type: string
                            description: Simple string match value
                            example: example-value
                          - type: number
                            description: Simple number match value
                            example: 42
                          - type: boolean
                            description: Simple boolean match value
                            example: true
                          - type: object
                            properties:
                              eq:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                description: Equals - exact match
                                example: exact-value
                              ne:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                description: Not equals - exclude exact match
                                example: exclude-value
                              gt:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Greater than - for numbers and dates
                                example: 100
                              gte:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Greater than or equal - for numbers and dates
                                example: 100
                              lt:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Less than - for numbers and dates
                                example: 50
                              lte:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Less than or equal - for numbers and dates
                                example: 50
                              between:
                                type: array
                                items:
                                  anyOf:
                                    - type: number
                                    - type: string
                                minItems: 2
                                maxItems: 2
                                description: >-
                                  Between two values [min, max] - for numbers
                                  and dates
                                example:
                                  - 10
                                  - 100
                              in:
                                type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                description: Value is in the provided array
                                example:
                                  - value1
                                  - value2
                                  - value3
                              nin:
                                type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                description: Value is not in the provided array
                                example:
                                  - exclude1
                                  - exclude2
                              startsWith:
                                type: string
                                description: String starts with the provided value
                                example: prefix
                              inference_task_executions:
                                type: object
                                additionalProperties:
                                  type: string
                                  format: uuid
                                default: {}
                              endsWith:
                                type: string
                                description: String ends with the provided value
                                example: suffix
                              contains:
                                type: string
                                description: String contains the provided value
                                example: substring
                              exists:
                                type: boolean
                                description: Field exists (true) or does not exist (false)
                                example: true
                              isNull:
                                type: boolean
                                description: Field is null (true) or is not null (false)
                                example: false
                              isNotNull:
                                type: boolean
                                description: Field is not null (true) or is null (false)
                                example: true
                            additionalProperties: false
                            description: Advanced filter operators for complex queries
                        description: Filter by creation date
                      updatedAt:
                        anyOf:
                          - type: string
                            description: Simple string match value
                            example: example-value
                          - type: number
                            description: Simple number match value
                            example: 42
                          - type: boolean
                            description: Simple boolean match value
                            example: true
                          - type: object
                            properties:
                              eq:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                description: Equals - exact match
                                example: exact-value
                              ne:
                                anyOf:
                                  - type: string
                                  - type: number
                                  - type: boolean
                                description: Not equals - exclude exact match
                                example: exclude-value
                              gt:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Greater than - for numbers and dates
                                example: 100
                              gte:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Greater than or equal - for numbers and dates
                                example: 100
                              lt:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Less than - for numbers and dates
                                example: 50
                              lte:
                                anyOf:
                                  - type: number
                                  - type: string
                                description: Less than or equal - for numbers and dates
                                example: 50
                              between:
                                type: array
                                items:
                                  anyOf:
                                    - type: number
                                    - type: string
                                minItems: 2
                                maxItems: 2
                                description: >-
                                  Between two values [min, max] - for numbers
                                  and dates
                                example:
                                  - 10
                                  - 100
                              in:
                                type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                description: Value is in the provided array
                                example:
                                  - value1
                                  - value2
                                  - value3
                              nin:
                                type: array
                                items:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                description: Value is not in the provided array
                                example:
                                  - exclude1
                                  - exclude2
                              startsWith:
                                type: string
                                description: String starts with the provided value
                                example: prefix
                              inference_task_executions:
                                type: object
                                additionalProperties:
                                  type: string
                                  format: uuid
                                default: {}
                              endsWith:
                                type: string
                                description: String ends with the provided value
                                example: suffix
                              contains:
                                type: string
                                description: String contains the provided value
                                example: substring
                              exists:
                                type: boolean
                                description: Field exists (true) or does not exist (false)
                                example: true
                              isNull:
                                type: boolean
                                description: Field is null (true) or is not null (false)
                                example: false
                              isNotNull:
                                type: boolean
                                description: Field is not null (true) or is null (false)
                                example: true
                            additionalProperties: false
                            description: Advanced filter operators for complex queries
                        description: Filter by last update date
                      metadata:
                        type: object
                        additionalProperties:
                          anyOf:
                            - type: string
                              description: Simple string match value
                              example: example-value
                            - type: number
                              description: Simple number match value
                              example: 42
                            - type: boolean
                              description: Simple boolean match value
                              example: true
                            - type: object
                              properties:
                                eq:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                  description: Equals - exact match
                                  example: exact-value
                                ne:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                  description: Not equals - exclude exact match
                                  example: exclude-value
                                gt:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Greater than - for numbers and dates
                                  example: 100
                                gte:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: >-
                                    Greater than or equal - for numbers and
                                    dates
                                  example: 100
                                lt:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Less than - for numbers and dates
                                  example: 50
                                lte:
                                  anyOf:
                                    - type: number
                                    - type: string
                                  description: Less than or equal - for numbers and dates
                                  example: 50
                                between:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: number
                                      - type: string
                                  minItems: 2
                                  maxItems: 2
                                  description: >-
                                    Between two values [min, max] - for numbers
                                    and dates
                                  example:
                                    - 10
                                    - 100
                                in:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                  description: Value is in the provided array
                                  example:
                                    - value1
                                    - value2
                                    - value3
                                nin:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                  description: Value is not in the provided array
                                  example:
                                    - exclude1
                                    - exclude2
                                startsWith:
                                  type: string
                                  description: String starts with the provided value
                                  example: prefix
                                inference_task_executions:
                                  type: object
                                  additionalProperties:
                                    type: string
                                    format: uuid
                                  default: {}
                                endsWith:
                                  type: string
                                  description: String ends with the provided value
                                  example: suffix
                                contains:
                                  type: string
                                  description: String contains the provided value
                                  example: substring
                                exists:
                                  type: boolean
                                  description: >-
                                    Field exists (true) or does not exist
                                    (false)
                                  example: true
                                isNull:
                                  type: boolean
                                  description: Field is null (true) or is not null (false)
                                  example: false
                                isNotNull:
                                  type: boolean
                                  description: Field is not null (true) or is null (false)
                                  example: true
                              additionalProperties: false
                              description: Advanced filter operators for complex queries
                          description: >-
                            Filter value - can be a simple value for exact match
                            or an object with operators
                        description: >-
                          Filter by metadata fields - key-value pairs where
                          values can use advanced operators
                    additionalProperties: false
                    description: Original query used to fetch the content
                    example:
                      categoryId:
                        exists: false
                      fileFormat:
                        in:
                          - application/pdf
                  workflowId:
                    type: string
                    format: uuid
                    description: UUID of the workflow used
                    example: 987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b
                  workspaceId:
                    type: string
                    pattern: ^sws-[a-z0-9]{8}$
                    description: Workspace ID where the batch execution ran
                    example: sws-abc12345
                  dataspaceIds:
                    type: array
                    items:
                      type: string
                      pattern: ^sds-[a-z0-9]{8}$
                    description: Array of dataspace IDs where the workflow ran
                    example:
                      - sds-abc12345
                      - sds-def67890
                  workflowExecutionIds:
                    type: array
                    items:
                      type: string
                      format: uuid
                    description: >-
                      Array of individual workflow execution IDs (one for each
                      content based on the filters)
                    example:
                      - 789e0123-e89b-12d3-a456-426614174002
                      - abc1234d-e89b-12d3-a456-426614174003
                      - def5678e-e89b-12d3-a456-426614174004
                  status:
                    type: string
                    enum:
                      - started
                      - completed
                      - failed
                    description: Status of the batch execution
                    example: completed
                  errorMessage:
                    type: string
                    nullable: true
                    description: Error message if the batch execution failed
                    example: 'Workflow validation failed: Invalid agent ID'
                  createdAt:
                    type: string
                    format: date-time
                    description: When the batch execution was created
                    example: '2025-01-15T10:30:00Z'
                  completedAt:
                    type: string
                    nullable: true
                    format: date-time
                    description: When the batch execution completed
                    example: '2025-01-15T10:45:00Z'
                required:
                  - id
                  - workflowId
                  - workspaceId
                  - dataspaceIds
                  - workflowExecutionIds
                  - status
                  - errorMessage
                  - createdAt
              example:
                id: 123e4567-e89b-12d3-a456-426614174000
                query:
                  fileFormat:
                    in:
                      - application/pdf
                      - >-
                        application/vnd.openxmlformats-officedocument.wordprocessingml.document
                  metadata:
                    author:
                      exists: true
                    status:
                      in:
                        - pending
                        - draft
                workflowId: 987fcdeb-51a2-43d1-9c4e-5f6e7d8c9a0b
                workspaceId: sws-abc12345
                dataspaceIds:
                  - sds-abc12345
                  - sds-def67890
                workflowExecutionIds:
                  - 789e0123-e89b-12d3-a456-426614174002
                  - abc1234d-e89b-12d3-a456-426614174003
                  - def5678e-e89b-12d3-a456-426614174004
                status: completed
                errorMessage: null
                createdAt: '2025-01-15T10:30:00Z'
                completedAt: '2025-01-15T10:45:00Z'
        '400':
          description: Bad request - invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Bad Request
                  message:
                    type: string
                    example: Invalid request parameters
                required:
                  - error
                  - message
              example:
                error: Bad Request
                message: Invalid workflow ID or no agents available for account
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  message:
                    type: string
                    example: Authentication required
                required:
                  - error
                  - message
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: An unexpected error occurred during batch execution
                required:
                  - error
                  - message
  /batch-workflow-executions/{batchExecutionId}/status:
    get:
      operationId: getBatchWorkflowExecutionStatus
      tags:
        - Batch Workflow Executions
      summary: Get batch workflow execution status
      description: >-
        Returns real-time status information about a batch workflow execution,
        including progress tracking of individual workflow executions. This
        provides a summary of how many executions are completed, failed, or
        still in progress, along with the overall batch status.
      parameters:
        - schema:
            type: string
            format: uuid
            description: UUID of the batch workflow execution
            example: 123e4567-e89b-12d3-a456-426614174000
          required: true
          description: UUID of the batch workflow execution
          name: batchExecutionId
          in: path
      responses:
        '200':
          description: Batch workflow execution status retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: number
                    description: >-
                      Total number of individual workflow executions in this
                      batch
                    example: 15
                  completed:
                    type: number
                    description: >-
                      Number of workflow executions that have completed
                      successfully
                    example: 12
                  failed:
                    type: number
                    description: Number of workflow executions that have failed
                    example: 1
                  inProgress:
                    type: number
                    description: Number of workflow executions currently in progress
                    example: 2
                  status:
                    type: string
                    enum:
                      - completed
                      - processing
                      - failed
                    description: Overall status of the batch execution
                    example: processing
                required:
                  - total
                  - completed
                  - failed
                  - inProgress
                  - status
              example:
                total: 15
                completed: 12
                failed: 1
                inProgress: 2
                status: processing
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  message:
                    type: string
                    example: Authentication required
                required:
                  - error
                  - message
        '404':
          description: Batch workflow execution not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Not Found
                  message:
                    type: string
                    example: Batch workflow execution not found
                required:
                  - error
                  - message
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: An unexpected error occurred during batch execution
                required:
                  - error
                  - message
  /task-executions:
    get:
      operationId: listTaskExecutions
      description: List task executions with optional filtering
      summary: Get a paginated list of task executions
      tags:
        - Task Executions
      parameters:
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Optional filter by dataspace ID
            example: sds-abc12345
          required: false
          description: Optional filter by dataspace ID
          name: primaryScopeDataspaceId
          in: query
        - schema:
            type: string
            enum:
              - started
              - completed
              - failed
            description: Filter by execution status
            example: completed
          required: false
          description: Filter by execution status
          name: status
          in: query
        - schema:
            type: string
            format: uuid
            description: Filter by workflow execution ID
            example: 123e4567-e89b-12d3-a456-426614174000
          required: false
          description: Filter by workflow execution ID
          name: workflowExecutionId
          in: query
        - schema:
            type: string
            format: uuid
            description: Filter by task definition ID
            example: abc1234d-e89b-12d3-a456-426614174003
          required: false
          description: Filter by task definition ID
          name: taskDefinitionId
          in: query
        - schema:
            type: string
            format: uuid
            description: Filter by primary scope object ID
            example: 456e7890-e89b-12d3-a456-426614174001
          required: false
          description: Filter by primary scope object ID
          name: primaryScopeObjectId
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
            description: Number of items to return
            example: 20
          required: false
          description: Number of items to return
          name: limit
          in: query
        - schema:
            type: integer
            nullable: true
            minimum: 0
            default: 0
            description: Number of items to skip
            example: 0
          required: false
          description: Number of items to skip
          name: offset
          in: query
      responses:
        '200':
          description: Task executions retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          example: 789e0123-e89b-12d3-a456-426614174002
                        workflowExecutionId:
                          type: string
                          format: uuid
                          example: 123e4567-e89b-12d3-a456-426614174000
                        taskDefinitionId:
                          type: string
                          format: uuid
                          example: abc1234d-e89b-12d3-a456-426614174003
                        taskName:
                          type: string
                          example: Categorize Document
                        primaryScopeObjectId:
                          type: string
                          format: uuid
                          example: 456e7890-e89b-12d3-a456-426614174001
                        primaryScopeDataspaceId:
                          type: string
                          pattern: ^sds-[a-z0-9]{8}$
                          description: Short dataspace ID with sds- prefix
                          example: sds-abc12345
                        status:
                          type: string
                          enum:
                            - started
                            - completed
                            - failed
                          example: completed
                        startedAt:
                          type: string
                          format: date-time
                          example: '2025-01-15T10:30:30Z'
                        completedAt:
                          type: string
                          nullable: true
                          format: date-time
                          example: '2025-01-15T10:32:00Z'
                        errorMessage:
                          type: string
                          nullable: true
                          example: Task failed due to invalid input format
                      required:
                        - id
                        - workflowExecutionId
                        - taskDefinitionId
                        - taskName
                        - primaryScopeObjectId
                        - primaryScopeDataspaceId
                        - status
                        - startedAt
                        - completedAt
                        - errorMessage
                    description: Array of task execution objects
                  totalCount:
                    type: integer
                    description: Total number of task executions matching the query
                    example: 42
                  limit:
                    type: integer
                    description: Number of items requested
                    example: 20
                  offset:
                    type: integer
                    description: Number of items skipped
                    example: 0
                required:
                  - data
                  - totalCount
                  - limit
                  - offset
        '400':
          description: Invalid query parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid status value
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Failed to retrieve task executions
  /task-executions/{taskExecutionId}:
    get:
      operationId: getTaskExecutionById
      description: Get task execution by ID
      summary: Retrieve a single task execution by its ID
      tags:
        - Task Executions
      parameters:
        - schema:
            type: string
            format: uuid
            description: UUID of the task execution
            example: 789e0123-e89b-12d3-a456-426614174002
          required: true
          description: UUID of the task execution
          name: taskExecutionId
          in: path
      responses:
        '200':
          description: Task execution retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    example: 789e0123-e89b-12d3-a456-426614174002
                  workflowExecutionId:
                    type: string
                    format: uuid
                    example: 123e4567-e89b-12d3-a456-426614174000
                  taskDefinitionId:
                    type: string
                    format: uuid
                    example: abc1234d-e89b-12d3-a456-426614174003
                  taskName:
                    type: string
                    example: Categorize Document
                  primaryScopeObjectId:
                    type: string
                    format: uuid
                    example: 456e7890-e89b-12d3-a456-426614174001
                  primaryScopeDataspaceId:
                    type: string
                    pattern: ^sds-[a-z0-9]{8}$
                    description: Short dataspace ID with sds- prefix
                    example: sds-abc12345
                  status:
                    type: string
                    enum:
                      - started
                      - completed
                      - failed
                    example: completed
                  startedAt:
                    type: string
                    format: date-time
                    example: '2025-01-15T10:30:30Z'
                  completedAt:
                    type: string
                    nullable: true
                    format: date-time
                    example: '2025-01-15T10:32:00Z'
                  errorMessage:
                    type: string
                    nullable: true
                    example: Task failed due to invalid input format
                required:
                  - id
                  - workflowExecutionId
                  - taskDefinitionId
                  - taskName
                  - primaryScopeObjectId
                  - primaryScopeDataspaceId
                  - status
                  - startedAt
                  - completedAt
                  - errorMessage
        '400':
          description: Invalid task execution ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid UUID format
        '404':
          description: Task execution not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: >-
                      Task execution not found with ID:
                      789e0123-e89b-12d3-a456-426614174002
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Failed to retrieve task execution
  /task-execution-outputs/{taskNameSlug}/{dataspaceId}/{taskExecutionId}:
    get:
      operationId: getTaskExecutionOutput
      description: Get task execution output by parameters
      summary: Retrieve the output data from a completed task execution
      tags:
        - Task Execution Outputs
      parameters:
        - schema:
            type: string
            description: URL-friendly task name slug
            example: categorize-document
          required: true
          description: URL-friendly task name slug
          name: taskNameSlug
          in: path
        - schema:
            type: string
            pattern: ^sds-[a-z0-9]{8}$
            description: Short dataspace ID with sds- prefix
            example: sds-abc12345
          required: true
          description: Short dataspace ID with sds- prefix
          name: dataspaceId
          in: path
        - schema:
            type: string
            format: uuid
            description: UUID of the task execution
            example: 789e0123-e89b-12d3-a456-426614174002
          required: true
          description: UUID of the task execution
          name: taskExecutionId
          in: path
      responses:
        '200':
          description: Task execution output retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  taskExecutionId:
                    type: string
                    format: uuid
                    description: UUID of the task execution
                    example: 789e0123-e89b-12d3-a456-426614174002
                  taskNameSlug:
                    type: string
                    description: URL-friendly task name slug
                    example: categorize-document
                  dataspaceId:
                    type: string
                    pattern: ^sds-[a-z0-9]{8}$
                    description: Short dataspace ID with sds- prefix
                    example: sds-abc12345
                  contentType:
                    type: string
                    description: MIME type of the output
                    example: application/json
                  data:
                    type: object
                    properties: {}
                    description: Task execution output data
                    example:
                      category: Traffic Citation
                      categoryId: 82fe7c76-469d-4de7-826b-ce1044596a14
                      confidence: high
                      justification: Document clearly identifies as a parking citation
                  retrievedAt:
                    type: string
                    format: date-time
                    description: When the output was retrieved
                    example: '2025-01-15T10:35:00Z'
                required:
                  - taskExecutionId
                  - taskNameSlug
                  - dataspaceId
                  - contentType
                  - data
                  - retrievedAt
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid task execution ID format
        '404':
          description: Task execution output not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: >-
                      Task execution output not found for task
                      categorize-document, execution
                      789e0123-e89b-12d3-a456-426614174002
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Failed to retrieve task execution output
  /register-workflows:
    get:
      operationId: listRegisteredWorkflows
      tags:
        - Registered Workflows
      summary: List registered workflows
      description: >-
        Returns a paginated list of registered workflows cached from sync-apis.
        Supports filtering by account ID and workflow name. These workflows are
        cached locally for fast access during workflow execution.
      parameters:
        - schema:
            type: string
            pattern: ^scd-[a-z0-9]{8}$
            description: Filter by account ID
            example: scd-abc12345
          required: false
          description: Filter by account ID
          name: accountId
          in: query
        - schema:
            type: string
            description: Filter by workflow name (case-insensitive partial match)
            example: classification
          required: false
          description: Filter by workflow name (case-insensitive partial match)
          name: name
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
            description: Number of items to return
            example: 20
          required: false
          description: Number of items to return
          name: limit
          in: query
        - schema:
            type: integer
            nullable: true
            minimum: 0
            default: 0
            description: Number of items to skip
            example: 0
          required: false
          description: Number of items to skip
          name: offset
          in: query
      responses:
        '200':
          description: List of registered workflows retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          example: 123e4567-e89b-12d3-a456-426614174000
                        name:
                          type: string
                          example: Document Classification Workflow
                        description:
                          type: string
                          example: Workflow to classify documents and extract metadata
                        taskDag:
                          type: object
                          additionalProperties:
                            type: array
                            items:
                              type: string
                              format: uuid
                          example:
                            789e0123-e89b-12d3-a456-426614174002:
                              - abc1234d-e89b-12d3-a456-426614174003
                            abc1234d-e89b-12d3-a456-426614174003: []
                        accountId:
                          type: string
                          pattern: ^scd-[a-z0-9]{8}$
                          description: Short account ID with scd- prefix
                          example: scd-abc12345
                        createdAt:
                          type: string
                          format: date-time
                          example: '2025-01-15T10:30:00Z'
                        lastUpdatedAt:
                          type: string
                          nullable: true
                          format: date-time
                          example: '2025-01-15T10:35:00Z'
                        registeredAt:
                          type: string
                          format: date-time
                          example: '2025-01-15T10:30:05Z'
                      required:
                        - id
                        - name
                        - description
                        - taskDag
                        - accountId
                        - createdAt
                        - lastUpdatedAt
                        - registeredAt
                    description: Array of registered workflows
                  totalCount:
                    type: integer
                    description: Total number of workflows matching the filter
                    example: 25
                  limit:
                    type: integer
                    description: Number of items returned
                    example: 20
                  offset:
                    type: integer
                    description: Number of items skipped
                    example: 0
                required:
                  - items
                  - totalCount
                  - limit
                  - offset
              example:
                items:
                  - id: 123e4567-e89b-12d3-a456-426614174000
                    name: Document Classification Workflow
                    description: Workflow to classify documents and extract metadata
                    taskDag:
                      789e0123-e89b-12d3-a456-426614174002:
                        - abc1234d-e89b-12d3-a456-426614174003
                      abc1234d-e89b-12d3-a456-426614174003: []
                    accountId: scd-abc12345
                    createdAt: '2025-01-15T10:30:00Z'
                    lastUpdatedAt: '2025-01-15T10:35:00Z'
                    registeredAt: '2025-01-15T10:30:05Z'
                  - id: 234e5678-e89b-12d3-a456-426614174001
                    name: Content Analysis Workflow
                    description: Workflow to analyze content and generate insights
                    taskDag:
                      def5678e-e89b-12d3-a456-426614174004: []
                    accountId: scd-abc12345
                    createdAt: '2025-01-15T11:00:00Z'
                    lastUpdatedAt: null
                    registeredAt: '2025-01-15T11:00:05Z'
                totalCount: 2
                limit: 20
                offset: 0
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  message:
                    type: string
                    example: Authentication required
                required:
                  - error
                  - message
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Internal Server Error
                  message:
                    type: string
                    example: An unexpected error occurred
                required:
                  - error
                  - message
  /content-upload-sessions:
    post:
      operationId: createUploadSession
      tags:
        - Content Upload Sessions
      summary: Create a new content upload session
      description: >-
        Initializes a new upload session for reliable file uploads.

        **Features:** - Supports files up to 10GB - Optimized for large file
        transfers - Session expiration and cleanup - Progress tracking

        **Process:** 1. Create upload session with file metadata 2. Upload file
        content using the session ID 3. System automatically processes the
        upload when complete 4. Returns content ID when finished

        **Upload Optimization:** The system automatically optimizes the upload
        process for reliable transfer of large files with automatic retry and
        error handling.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                fileName:
                  type: string
                  minLength: 1
                  maxLength: 500
                  description: Name of the file
                  example: large-document.pdf
                fileSize:
                  type: integer
                  minimum: 1
                  description: Size of the file in bytes
                  example: 104857600
                fileFormat:
                  type: string
                  minLength: 1
                  maxLength: 200
                  description: MIME type of the file
                  example: application/pdf
                dataspaceId:
                  type: string
                  pattern: ^sds-[a-z0-9]{8}$
                  description: Target dataspace ID
                  example: sds-abc12345
              required:
                - fileName
                - fileSize
                - fileFormat
                - dataspaceId
      responses:
        '201':
          description: Upload session created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Unique upload session ID
                    example: 123e4567-e89b-12d3-a456-426614174000
                  fileName:
                    type: string
                    description: Name of the file being uploaded
                    example: large-document.pdf
                  fileSize:
                    type: number
                    description: Size of the file in bytes
                    example: 104857600
                  fileFormat:
                    type: string
                    description: MIME type of the file
                    example: application/pdf
                  chunkSize:
                    type: number
                    description: Size of each chunk in bytes
                    example: 1048576
                  totalChunks:
                    type: number
                    description: Total number of chunks for this file
                    example: 100
                  uploadedChunks:
                    type: number
                    description: Number of chunks uploaded so far
                    example: 45
                  status:
                    type: string
                    enum:
                      - pending
                      - uploading
                      - assembling
                      - completed
                      - failed
                      - expired
                    description: Current status of the upload session
                    example: uploading
                  contentId:
                    type: string
                    format: uuid
                    description: Content ID when upload is completed
                    example: 987e6543-e21b-43d2-b654-321098765432
                  expiresAt:
                    type: string
                    format: date-time
                    description: When this upload session expires
                    example: '2024-01-16T10:30:00Z'
                  createdAt:
                    type: string
                    format: date-time
                    description: When this upload session was created
                    example: '2024-01-15T10:30:00Z'
                  updatedAt:
                    type: string
                    format: date-time
                    description: When this upload session was last updated
                    example: '2024-01-15T11:15:00Z'
                required:
                  - id
                  - fileName
                  - fileSize
                  - fileFormat
                  - chunkSize
                  - totalChunks
                  - uploadedChunks
                  - status
                  - expiresAt
                  - createdAt
                  - updatedAt
        '400':
          description: Invalid request data
        '401':
          description: Authentication required
        '413':
          description: File size exceeds maximum limit (10GB)
  /content-upload-sessions/{sessionId}/chunks:
    post:
      operationId: uploadChunk
      tags:
        - Content Upload Sessions
      summary: Upload file content
      description: >-
        Uploads file content for an existing upload session.

        **Upload Process:** - Upload content reliably with automatic error
        handling - System tracks progress automatically - Optional content
        integrity validation via checksum - Processes file when upload is
        complete - Creates content record upon completion

        **Upload Flow:** 1. Upload content using multipart/form-data 2. System
        processes content reliably on server 3. When upload is complete,
        assembles into complete file 4. Stores complete file in secure storage
        5. Creates content record in database 6. Cleans up temporary files

        **Error Handling:** - Invalid content is rejected with detailed error
        messages - Failed processing triggers automatic cleanup - Session
        expiration prevents orphaned files
      parameters:
        - schema:
            type: string
            format: uuid
            description: Upload session ID
            example: 123e4567-e89b-12d3-a456-426614174000
          required: true
          description: Upload session ID
          name: sessionId
          in: path
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                chunk:
                  type: string
                  format: binary
                  description: Binary content data (max 900KB)
                chunkNumber:
                  type: integer
                  description: Content sequence number (1-based)
                  minimum: 1
                  example: 1
                checksum:
                  type: string
                  description: Optional SHA-256 checksum for integrity verification
                  example: a1b2c3d4e5f6789...
              required:
                - chunk
                - chunkNumber
      responses:
        '200':
          description: Content uploaded successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  sessionId:
                    type: string
                    format: uuid
                    description: Upload session ID
                    example: 123e4567-e89b-12d3-a456-426614174000
                  chunkNumber:
                    type: number
                    description: The chunk number that was uploaded
                    example: 45
                  uploadedChunks:
                    type: number
                    description: Total number of chunks uploaded so far
                    example: 45
                  totalChunks:
                    type: number
                    description: Total number of chunks for this file
                    example: 100
                  status:
                    type: string
                    description: Current status of the upload session
                    example: uploading
                  isComplete:
                    type: boolean
                    description: Whether all chunks have been uploaded
                    example: false
                  contentId:
                    type: string
                    format: uuid
                    description: Content ID when upload is completed
                    example: 987e6543-e21b-43d2-b654-321098765432
                required:
                  - sessionId
                  - chunkNumber
                  - uploadedChunks
                  - totalChunks
                  - status
                  - isComplete
        '400':
          description: Invalid content data or session
        '401':
          description: Authentication required
        '403':
          description: Access denied to upload session
        '404':
          description: Upload session not found
        '413':
          description: Content size exceeds limit (900KB)
  /content-upload-sessions/{sessionId}:
    get:
      operationId: getUploadSession
      tags:
        - Content Upload Sessions
      summary: Get upload session status
      description: >-
        Retrieves the current status and progress of an upload session.

        **Session Statuses:** - `pending`: Session created, awaiting content -
        `uploading`: Receiving content - `assembling`: Upload complete,
        processing file - `completed`: Upload successful, content created -
        `failed`: Upload failed, session invalid - `expired`: Session expired,
        cleanup scheduled

        **Progress Tracking:** Use this endpoint to monitor upload progress by
        checking: - `uploadedChunks` vs `totalChunks` for progress percentage -
        `status` for current phase - `contentId` when upload completes
      parameters:
        - schema:
            type: string
            format: uuid
            description: Upload session ID
            example: 123e4567-e89b-12d3-a456-426614174000
          required: true
          description: Upload session ID
          name: sessionId
          in: path
      responses:
        '200':
          description: Upload session details
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Unique upload session ID
                    example: 123e4567-e89b-12d3-a456-426614174000
                  fileName:
                    type: string
                    description: Name of the file being uploaded
                    example: large-document.pdf
                  fileSize:
                    type: number
                    description: Size of the file in bytes
                    example: 104857600
                  fileFormat:
                    type: string
                    description: MIME type of the file
                    example: application/pdf
                  chunkSize:
                    type: number
                    description: Size of each chunk in bytes
                    example: 1048576
                  totalChunks:
                    type: number
                    description: Total number of chunks for this file
                    example: 100
                  uploadedChunks:
                    type: number
                    description: Number of chunks uploaded so far
                    example: 45
                  status:
                    type: string
                    enum:
                      - pending
                      - uploading
                      - assembling
                      - completed
                      - failed
                      - expired
                    description: Current status of the upload session
                    example: uploading
                  contentId:
                    type: string
                    format: uuid
                    description: Content ID when upload is completed
                    example: 987e6543-e21b-43d2-b654-321098765432
                  expiresAt:
                    type: string
                    format: date-time
                    description: When this upload session expires
                    example: '2024-01-16T10:30:00Z'
                  createdAt:
                    type: string
                    format: date-time
                    description: When this upload session was created
                    example: '2024-01-15T10:30:00Z'
                  updatedAt:
                    type: string
                    format: date-time
                    description: When this upload session was last updated
                    example: '2024-01-15T11:15:00Z'
                required:
                  - id
                  - fileName
                  - fileSize
                  - fileFormat
                  - chunkSize
                  - totalChunks
                  - uploadedChunks
                  - status
                  - expiresAt
                  - createdAt
                  - updatedAt
        '401':
          description: Authentication required
        '403':
          description: Access denied to upload session
        '404':
          description: Upload session not found
