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

# Get pipeline definition

> Returns the pipeline's declarative definition. Set `Accept: application/yaml` for YAML or `Accept: application/json` for JSON.



## OpenAPI

````yaml /cdc-openapi.yaml get /pipelines/{id}/definition
openapi: 3.0.3
info:
  title: Integrate.io ELT & CDC REST API
  description: >
    The Integrate.io ELT & CDC REST API lets you list, create, update, start,
    stop, and archive

    ELT & CDC pipelines from outside the dashboard. Pipelines are described by a
    declarative

    definition document (YAML or JSON), so the same configuration can be
    version-controlled,

    reviewed, and reapplied across environments.


    ## Authentication

    Requests are authenticated with a bearer API key:

    ```

    Authorization: Bearer fdk_<your-key>

    ```

    Every Integrate.io API key is prefixed with `fdk_`. The full key value is
    shown only once at

    creation time. Store it in a secret manager. If a key is lost or leaked,
    revoke it and mint a

    new one. Keys are minted from the dashboard under **Settings > API Keys** by
    account admins.


    ## Pipeline definition document

    Create, replace, and validate requests take a declarative definition
    document. For the full

    schema, supported transformation types, and examples, see the

    [REST API overview](/cdc/api#pipeline-definition-document).
  version: '1.0'
  contact:
    name: Integrate.io Support
    url: https://www.integrate.io
servers:
  - url: https://{host}/api/public/v1
    variables:
      host:
        default: console.flydata.app
        description: >-
          API host. Confirm with the Integrate.io team; the API may instead be
          served from a dedicated host such as api.flydata.app. The public API
          lives under the /api/public/v1 base path.
security:
  - bearerAuth: []
tags:
  - name: Pipelines
    description: Manage ELT & CDC pipelines and their definitions.
paths:
  /pipelines/{id}/definition:
    parameters:
      - $ref: '#/components/parameters/PipelineId'
    get:
      tags:
        - Pipelines
      summary: Get pipeline definition
      description: >-
        Returns the pipeline's declarative definition. Set `Accept:
        application/yaml` for YAML or `Accept: application/json` for JSON.
      operationId: getPipelineDefinition
      responses:
        '200':
          description: The pipeline definition document.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineDefinition'
            application/yaml:
              schema:
                $ref: '#/components/schemas/PipelineDefinition'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    PipelineId:
      name: id
      in: path
      required: true
      schema:
        type: integer
  schemas:
    PipelineDefinition:
      type: object
      description: >-
        A stable, customer-facing projection of the pipeline. It omits
        credentials, state backend configuration, region orchestration, and
        other internal fields. Unknown keys are rejected.
      required:
        - definition_version
        - name
        - source
        - destination
        - sync
        - tables
      properties:
        definition_version:
          type: integer
          description: Contract version. Currently 1.
          example: 1
        name:
          type: string
          example: orders-to-snowflake
        source:
          $ref: '#/components/schemas/ConnectionRef'
        destination:
          $ref: '#/components/schemas/ConnectionRef'
        sync:
          $ref: '#/components/schemas/Sync'
        tables:
          type: array
          items:
            $ref: '#/components/schemas/Table'
        transformations:
          type: array
          description: Field-level transforms applied to records.
          items:
            $ref: '#/components/schemas/Transformation'
        hooks:
          type: array
          description: Existing notification hooks to attach to pipeline events.
          items:
            $ref: '#/components/schemas/Hook'
      additionalProperties: false
    ConnectionRef:
      type: object
      required:
        - connection
      properties:
        connection:
          type: object
          required:
            - id
          properties:
            id:
              type: integer
              description: Existing connection ID.
    Sync:
      type: object
      description: >-
        Provide either `frequency` (which sets both source and destination) or
        both `source_frequency` and `destination_frequency`. Values are in
        minutes.
      properties:
        frequency:
          type: integer
        source_frequency:
          type: integer
        destination_frequency:
          type: integer
        auto_sync_new_tables:
          type: boolean
    Table:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          example: public.orders
        append_only:
          type: boolean
        columns:
          type: object
          description: Select columns with `include` or `exclude` (not both).
          properties:
            include:
              type: array
              items:
                type: string
            exclude:
              type: array
              items:
                type: string
    Transformation:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - exclude_fields
            - rename_fields
            - toggle_case
            - find_and_replace
            - replace_in_field_name
            - history_mode
        table:
          type: string
        config:
          type: object
          additionalProperties: true
    Hook:
      type: object
      required:
        - id
      properties:
        id:
          type: integer
        events:
          type: array
          items:
            type: string
          example:
            - pipeline_failed
            - pipeline_stopped
    Error:
      type: object
      properties:
        error:
          type: string
      additionalProperties: true
  responses:
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: >-
        The pipeline does not exist, or it belongs to another account. Unknown
        IDs and other-account IDs both return 404 to prevent enumeration.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer API key, prefixed with fdk_.

````