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

# List label versions

> Lists versions on a label in stable order: `sequential_version` ascending (oldest first), then version ID. Omitting `page_size` uses the default of 100. The maximum `page_size` is 1000. Negative `page_size` is rejected. A label with zero versions returns an empty list.



## OpenAPI

````yaml /openapi.json get /v1/labels/{labelId}/versions
openapi: 3.0.0
info:
  title: Clavata Public API v1
  description: Endpoints for creating and managing jobs via the Clavata Public API.
  version: 1.0.0
  contact:
    name: Clavata.ai
    url: https://clavata.ai
    email: support@clavata.ai
servers:
  - url: https://gateway.app.clavata.ai:8443
security:
  - Bearer_Token: []
tags:
  - name: Public API
    description: Endpoints for creating and managing jobs via the Clavata Public API.
paths:
  /v1/labels/{labelId}/versions:
    get:
      tags:
        - Labels
      summary: List label versions
      description: >-
        Lists versions on a label in stable order: `sequential_version`
        ascending (oldest first), then version ID. Omitting `page_size` uses the
        default of 100. The maximum `page_size` is 1000. Negative `page_size` is
        rejected. A label with zero versions returns an empty list.
      operationId: LabelsService_ListLabelVersions
      parameters:
        - name: labelId
          in: path
          required: true
          schema:
            type: string
        - name: pageSize
          description: >-
            Pagination: maximum number of items to return. When unset or 0,
            defaults to 100. Maximum 1000.
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: pageToken
          description: >-
            Pagination token for keyset pagination (from ListLabelVersions or
            GetLabel).
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1ListLabelVersionsResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
components:
  schemas:
    v1ListLabelVersionsResponse:
      type: object
      properties:
        labelVersions:
          type: array
          items:
            $ref: '#/components/schemas/v1LabelVersion'
        nextPageToken:
          type: string
          description: Set when more versions remain after this page.
    rpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    v1LabelVersion:
      type: object
      properties:
        labelVersionId:
          type: string
          title: The label version ID as set in the database
        labelId:
          type: string
          title: The label ID this version belongs to
        text:
          type: string
          title: The single-label DSL text for this version
        blob:
          type: string
          format: byte
          title: >-
            Optional compiled representation blob (typically omitted from
            customer-facing responses)
        description:
          type: string
          title: Optional description for this version
        signalCount:
          type: integer
          format: int64
          title: Number of signals in this version (complexity metric)
        totalSignalTokens:
          type: integer
          format: int64
          title: Total signal tokens in this version (complexity metric)
        created:
          type: string
          format: date-time
          title: Time the version was created
        expunged:
          type: boolean
          title: If the version is soft-deleted, this is set to true
        createdById:
          type: string
          title: The user ID who created this version
        sequentialVersion:
          type: integer
          format: int32
          title: Sequential version number (v1=1, v2=2, etc.) based on creation order
        parentLabelVersionId:
          type: string
          title: >-
            The parent version this was created from/based on (nil for first
            version or when lineage is unknown)
        complexityScore:
          type: number
          format: float
          title: Complexity score of the label version
        labelEvalOptions:
          $ref: '#/components/schemas/v1LabelEvalOptions'
        globalContext:
          type: string
          description: >-
            Optional global context to inject into LLM context window during
            evaluation.

            This provides additional context about the nature of content being
            evaluated.
        tokenCountsV2:
          $ref: '#/components/schemas/v1TokenCountsV2'
      description: >-
        LabelVersion is an immutable snapshot of a label's DSL + compiled
        representation.
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    v1LabelEvalOptions:
      type: object
      properties:
        bypassCache:
          type: boolean
          title: Whether to bypass the query cache during evaluation
        expedited:
          type: boolean
          title: Whether to use expedited evaluation (prioritizing speed over cost)
        bundleSize:
          type: integer
          format: int64
          title: The bundle size to use for query batching in Hermes
        threshold:
          type: number
          format: double
          title: The threshold to use for determining truthiness
        stack:
          type: string
          title: >-
            The stack name to use for evaluation (overrides default stack in
            Hermes)
        imageDetailLevel:
          $ref: '#/components/schemas/v1ImageDetailLevel'
      description: >-
        LabelEvalOptions are options that can be set per-label to control
        evaluation behavior.

        Field numbers/types intentionally mirror PolicyEvalOptions for parity.
    v1TokenCountsV2:
      type: object
      properties:
        dslTokenCount:
          type: integer
          format: int64
          description: V2 DSL-only token count for display.
        globalContextTokens:
          type: integer
          format: int64
          description: V2 token count for the saved global context.
        signalTokens:
          type: integer
          format: int64
          description: V2 token count for formatted DSL signals.
        signalSpecialTokens:
          type: integer
          format: int64
          description: V2 token count for DSL prompt special/structural tokens.
        contentSpecialTokens:
          type: integer
          format: int64
          description: V2 token count for content prompt special/structural tokens.
      description: >-
        TokenCountsV2 groups the static V2 token counts saved alongside a policy
        version,

        label version, or user label draft. The counts are calculated together,
        so message

        presence signals that V2 accounting is available for the saved DSL.
    v1ImageDetailLevel:
      type: string
      enum:
        - IMAGE_DETAIL_LEVEL_UNSPECIFIED
        - IMAGE_DETAIL_LEVEL_VERY_LOW
        - IMAGE_DETAIL_LEVEL_LOW
        - IMAGE_DETAIL_LEVEL_MEDIUM
        - IMAGE_DETAIL_LEVEL_HIGH
        - IMAGE_DETAIL_LEVEL_VERY_HIGH
      default: IMAGE_DETAIL_LEVEL_UNSPECIFIED
      description: >-
        ImageDetailLevel selects how much image detail is preserved when images
        are

        evaluated. Levels are semantic; the selected extractor's vision encoder
        maps

        each level to a model-specific token budget. Unspecified preserves the

        extractor's configured default.
  securitySchemes:
    Bearer_Token:
      type: http
      scheme: bearer
      bearerFormat: JWT

````