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

# One version of a CodeGen script, with its text

> Requires `pipeline:read`.



## OpenAPI

````yaml /openapi.yaml get /api/v1/pipelines/{name}/codegen-scripts/{kind}/versions/{version}
openapi: 3.0.3
info:
  title: Datris API
  description: >
    REST API for the Datris AI Data Platform. Ingest, validate, transform,
    store, and retrieve data.


    For AI agent integration, use the [MCP
    Server](https://docs.datris.ai/mcp-server) instead.
  version: 1.28.0
  contact:
    name: Datris
    url: https://datris.ai
  license:
    name: Apache 2.0
servers:
  - url: http://localhost:8080
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /api/v1/pipelines/{name}/codegen-scripts/{kind}/versions/{version}:
    get:
      tags:
        - Pipelines
      summary: One version of a CodeGen script, with its text
      description: Requires `pipeline:read`.
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
        - in: path
          name: kind
          required: true
          schema:
            type: string
            enum:
              - dataQuality
              - transformation
        - in: path
          name: version
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: The version
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CodeGenScriptVersion'
        '400':
          description: Unknown kind
        '404':
          description: Unknown pipeline or version
components:
  schemas:
    CodeGenScriptVersion:
      allOf:
        - $ref: '#/components/schemas/CodeGenScriptVersionSummary'
        - type: object
          properties:
            kind:
              type: string
              enum:
                - dataQuality
                - transformation
            script:
              type: string
              description: The script text of this version.
            fingerprint:
              type: string
            generatedAt:
              type: string
              format: date-time
            contractVersion:
              type: integer
            storage:
              type: string
              nullable: true
            repoPath:
              type: string
              nullable: true
    CodeGenScriptVersionSummary:
      type: object
      description: One version of a pipeline's CodeGen script, without its text.
      properties:
        version:
          type: integer
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
          nullable: true
          description: Key label or user that made the change; null for a run.
        changeNote:
          type: string
          nullable: true
          description: >-
            For example `(seeded from pre-versioning state)`, `restored from
            version 2`, `imported from catalog archive`, `adopted repository
            commit abc1234`.
        origin:
          type: string
          enum:
            - save
            - run
            - regenerate
            - repository
            - restore
            - restore-version
        model:
          type: string
          nullable: true
          description: The CodeGen model that wrote this text.
        commitSha:
          type: string
          nullable: true
          description: Code repository only. The commit holding this text.
        fingerprintMatchesCurrent:
          type: boolean
          description: >-
            True when the version was written for the pipeline's current
            instruction and source schema (only those versions can be restored).
        isLive:
          type: boolean
          description: True for the version runs execute now.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Optional API key for authentication (enabled via application.yaml)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.