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

# Preview Dataset Version



## OpenAPI

````yaml https://api.galileo.ai/public/v2/openapi.json post /v2/datasets/{dataset_id}/versions/{version_index}/preview
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.galileo.ai
    description: Galileo Public APIs - galileo-v2
security: []
paths:
  /v2/datasets/{dataset_id}/versions/{version_index}/preview:
    post:
      tags:
        - datasets
      summary: Preview Dataset Version
      operationId: >-
        preview_dataset_version_v2_datasets__dataset_id__versions__version_index__preview_post
      parameters:
        - name: dataset_id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            title: Dataset Id
        - name: version_index
          in: path
          required: true
          schema:
            type: integer
            title: Version Index
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
            title: Limit
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            minLength: 1
            maxLength: 2048
            title: Cursor
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LunaDatasetPreviewRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LunaDatasetPreview'
        '404':
          description: Dataset or immutable version unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LunaDatasetPreviewErrorResponse'
        '412':
          description: Draft revision conflict or unavailable revision
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LunaDatasetPreviewErrorResponse'
        '422':
          description: Invalid preview request, mapping or pagination
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LunaDatasetPreviewErrorResponse'
        '428':
          description: If-Match is required for draft preview
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LunaDatasetPreviewErrorResponse'
        '503':
          description: Preview storage is temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LunaDatasetPreviewErrorResponse'
      security:
        - APIKeyHeader: []
        - ClassicAPIKeyHeader: []
        - OAuth2PasswordBearer: []
        - HTTPBasic: []
components:
  schemas:
    LunaDatasetPreviewRequest:
      properties:
        mappings:
          anyOf:
            - $ref: '#/components/schemas/LunaDatasetMappings'
            - items:
                $ref: '#/components/schemas/LunaSemanticMapping'
              type: array
      additionalProperties: false
      type: object
      required:
        - mappings
      title: LunaDatasetPreviewRequest
    LunaDatasetPreview:
      properties:
        dataset:
          oneOf:
            - $ref: '#/components/schemas/LunaPreviewDraftRef'
            - $ref: '#/components/schemas/LunaPreviewVersionRef'
          title: Dataset
          discriminator:
            propertyName: kind
            mapping:
              draft: '#/components/schemas/LunaPreviewDraftRef'
              version: '#/components/schemas/LunaPreviewVersionRef'
        columns:
          items:
            $ref: '#/components/schemas/LunaDatasetPreviewColumn'
          type: array
          title: Columns
        rows:
          items:
            $ref: '#/components/schemas/LunaDatasetPreviewRow'
          type: array
          title: Rows
        total_row_count:
          type: integer
          title: Total Row Count
        column_count:
          type: integer
          title: Column Count
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
      type: object
      required:
        - dataset
        - columns
        - rows
        - total_row_count
        - column_count
      title: LunaDatasetPreview
    LunaDatasetPreviewErrorResponse:
      properties:
        detail:
          anyOf:
            - type: string
            - $ref: '#/components/schemas/LunaDatasetPreviewErrorDetail'
            - items:
                $ref: '#/components/schemas/LunaDatasetPreviewRequestValidationError'
              type: array
          title: Detail
        standard_error:
          anyOf:
            - $ref: '#/components/schemas/StandardError'
            - type: 'null'
      type: object
      required:
        - detail
      title: LunaDatasetPreviewErrorResponse
      description: >-
        Catalog failures and ordinary request-validation failures returned by
        preview routes.
    LunaDatasetMappings:
      properties:
        input:
          anyOf:
            - $ref: '#/components/schemas/LunaMappingConfig'
            - type: 'null'
        output:
          anyOf:
            - $ref: '#/components/schemas/LunaMappingConfig'
            - type: 'null'
        label:
          anyOf:
            - $ref: '#/components/schemas/LunaMappingConfig'
            - type: 'null'
        evaluator_ground_truth:
          anyOf:
            - $ref: '#/components/schemas/LunaMappingConfig'
            - type: 'null'
        metadata:
          anyOf:
            - $ref: '#/components/schemas/LunaMappingConfig'
            - type: 'null'
        tools:
          anyOf:
            - $ref: '#/components/schemas/LunaMappingConfig'
            - type: 'null'
        documents:
          anyOf:
            - $ref: '#/components/schemas/LunaMappingConfig'
            - type: 'null'
        mgt:
          additionalProperties:
            $ref: '#/components/schemas/LunaMappingConfig'
          propertyNames:
            format: uuid4
          type: object
          maxProperties: 32
          title: Mgt
      additionalProperties: false
      type: object
      title: LunaDatasetMappings
      description: >-
        Semantic mappings shared by preview, validation, and dataset
        finalization.
    LunaSemanticMapping:
      properties:
        source_column:
          type: string
          maxLength: 256
          minLength: 1
          title: Source Column
        target_field:
          type: string
          enum:
            - input
            - output
            - label
            - evaluator_ground_truth
            - metadata
            - tools
            - documents
            - generated_output
            - ground_truth
          title: Target Field
      additionalProperties: false
      type: object
      required:
        - source_column
        - target_field
      title: LunaSemanticMapping
    LunaPreviewDraftRef:
      properties:
        kind:
          type: string
          const: draft
          title: Kind
          default: draft
        dataset_id:
          type: string
          format: uuid4
          title: Dataset Id
        draft_revision:
          type: string
          title: Draft Revision
      type: object
      required:
        - dataset_id
        - draft_revision
      title: LunaPreviewDraftRef
    LunaPreviewVersionRef:
      properties:
        kind:
          type: string
          const: version
          title: Kind
          default: version
        dataset_id:
          type: string
          format: uuid4
          title: Dataset Id
        version_index:
          type: integer
          minimum: 1
          title: Version Index
      type: object
      required:
        - dataset_id
        - version_index
      title: LunaPreviewVersionRef
    LunaDatasetPreviewColumn:
      properties:
        key:
          type: string
          title: Key
        label:
          type: string
          title: Label
        source_columns:
          items:
            type: string
          type: array
          title: Source Columns
        source_column:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Column
        samples:
          items:
            $ref: '#/components/schemas/pydantic__types__JsonValue'
          type: array
          title: Samples
        group:
          anyOf:
            - type: string
            - type: 'null'
          title: Group
        scorer_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Scorer Id
      type: object
      required:
        - key
        - label
        - source_columns
      title: LunaDatasetPreviewColumn
    LunaDatasetPreviewRow:
      properties:
        row_ref:
          type: string
          title: Row Ref
        values:
          additionalProperties:
            $ref: '#/components/schemas/pydantic__types__JsonValue'
          type: object
          title: Values
        truncated_columns:
          items:
            type: string
          type: array
          title: Truncated Columns
      type: object
      required:
        - row_ref
        - values
      title: LunaDatasetPreviewRow
    LunaDatasetPreviewErrorDetail:
      properties:
        code:
          type: string
          title: Code
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        current_revision:
          anyOf:
            - type: string
            - type: 'null'
          title: Current Revision
        field_errors:
          anyOf:
            - items:
                $ref: '#/components/schemas/LunaDatasetPreviewFieldError'
              type: array
            - type: 'null'
          title: Field Errors
      type: object
      required:
        - code
      title: LunaDatasetPreviewErrorDetail
    LunaDatasetPreviewRequestValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Loc
        msg:
          type: string
          title: Msg
        type:
          type: string
          title: Type
        input:
          anyOf:
            - $ref: '#/components/schemas/pydantic__types__JsonValue'
            - type: 'null'
        ctx:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/pydantic__types__JsonValue'
              type: object
            - type: 'null'
          title: Ctx
      type: object
      required:
        - loc
        - msg
        - type
      title: LunaDatasetPreviewRequestValidationError
    StandardError:
      properties:
        error_code:
          type: integer
          title: Error Code
        error_type:
          $ref: '#/components/schemas/ErrorType'
        error_group:
          type: string
          title: Error Group
        severity:
          $ref: '#/components/schemas/ErrorSeverity'
        message:
          type: string
          title: Message
        user_action:
          anyOf:
            - type: string
            - type: 'null'
          title: User Action
        documentation_link:
          anyOf:
            - type: string
              maxLength: 2083
              minLength: 1
              format: uri
            - type: 'null'
          title: Documentation Link
        retriable:
          type: boolean
          title: Retriable
          default: false
        blocking:
          type: boolean
          title: Blocking
          default: false
        http_status_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Http Status Code
        source_service:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Service
        context:
          additionalProperties: true
          type: object
          title: Context
      type: object
      required:
        - error_code
        - error_type
        - error_group
        - severity
        - message
      title: StandardError
    LunaMappingConfig:
      properties:
        columns:
          items:
            type: string
            maxLength: 256
            minLength: 1
          type: array
          maxItems: 32
          minItems: 1
          title: Columns
        flatten:
          type: boolean
          title: Flatten
          default: true
      additionalProperties: false
      type: object
      required:
        - columns
      title: LunaMappingConfig
    pydantic__types__JsonValue: {}
    LunaDatasetPreviewFieldError:
      properties:
        field:
          type: string
          title: Field
        message:
          type: string
          title: Message
      type: object
      required:
        - field
        - message
      title: LunaDatasetPreviewFieldError
    ErrorType:
      type: string
      enum:
        - llm_api_error
        - credentials_error
        - data_validation_error
        - configuration_error
        - permission_error
        - not_found_error
        - workflow_error
        - rate_limit_error
        - system_error
        - timeout_error
        - not_applicable_reason
        - uncataloged_error
      title: ErrorType
    ErrorSeverity:
      type: string
      enum:
        - low
        - medium
        - high
        - critical
      title: ErrorSeverity
      description: Error severity levels for catalog entries.
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Splunk-AO-API-Key
    ClassicAPIKeyHeader:
      type: apiKey
      in: header
      name: Galileo-API-Key
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: https://api.galileo.ai/login
    HTTPBasic:
      type: http
      scheme: basic

````