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

# Update Transformation



## OpenAPI

````yaml /26.3/en/rest-api/openapi-v2.json put /v2/transformations/{transformation_id}
openapi: 3.0.3
info:
  title: CData Sync API
  description: >-
    REST API (v2) for CData Sync. The API lets you manage workspaces,
    connections, jobs, transformations, pipelines, and users, and to run and
    monitor data replication and transformation work.


    ## Base path

    All endpoints are served under the `/api.rsc` application path, e.g.
    `https://your-sync-host/api.rsc/v2/workspaces`.


    ## Authentication

    Requests are authenticated with an auth token passed in the
    `x-cdata-authtoken` header, or with HTTP Basic authentication using a Sync
    user's credentials. A token can be generated via `POST
    /v2/users/generate-token`.


    ## Response envelope

    Successful read/write responses return a JSON **array** of objects, even
    when a single resource is requested (the array then contains one element).
    `count` endpoints return an array containing a single `{ "count": <n> }`
    object. `DELETE` operations return `204 No Content`.


    ## Date/time format

    Date/time values are formatted as `yyyy-MM-dd'T'HH:mm:ssZZZ` (ISO-8601 with
    timezone offset). The format is also echoed in the `X-DateTime-Format`
    response header.


    ## Roles

    Most endpoints require the `cdata_user` role; workspace and user management
    endpoints require the `cdata_admin` role.
  version: '2.0'
servers:
  - url: '{baseUrl}'
    variables:
      baseUrl:
        default: https://sync.example.com/api.rsc/v2
        description: >-
          Base URL of your Sync instance, including scheme and application path
          (e.g. https://sync.example.com/api.rsc/v2).
security:
  - ApiKeyAuth: []
  - BasicAuth: []
tags:
  - name: Workspaces
    description: Manage workspaces and their child resources.
  - name: Connections
    description: Manage connections and inspect connection metadata.
  - name: Jobs
    description: Manage replication jobs, their tasks, history, and execution.
  - name: Transformations
    description: Manage transformations, their tasks, history, and execution.
  - name: Pipelines
    description: Manage pipelines, steps, events, history, and execution.
  - name: Users
    description: Manage users and generate auth tokens.
paths:
  /v2/transformations/{transformation_id}:
    parameters:
      - $ref: '#/components/parameters/TransformationId'
    put:
      tags:
        - Transformations
      summary: Update Transformation
      operationId: updateTransformation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransformationInput'
      responses:
        '200':
          $ref: '#/components/responses/TransformationList'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    TransformationId:
      name: transformation_id
      in: path
      required: true
      description: Transformation identifier.
      schema:
        type: string
  schemas:
    TransformationInput:
      type: object
      required:
        - name
        - type
        - destination_connection
      properties:
        name:
          type: string
        type:
          type: string
          description: Transformation type, e.g. "Standard", "DBT", "DBT-Cloud".
        destination_connection:
          $ref: '#/components/schemas/ConnectionReference'
        queries:
          type: array
          items:
            type: string
        labels:
          type: array
          items:
            type: string
        pipeline_id:
          type: string
        trigger:
          $ref: '#/components/schemas/TransformationTrigger'
        alerts:
          $ref: '#/components/schemas/Alerts'
        settings:
          $ref: '#/components/schemas/TransformationSettings'
    ConnectionReference:
      type: object
      description: References a connection by id or name. One of id or name is required.
      properties:
        id:
          type: string
        name:
          type: string
      minProperties: 1
    TransformationTrigger:
      type: object
      properties:
        type:
          type: string
          enum:
            - none
            - scheduled
            - after_job
        cron:
          type: string
        next_run_at:
          type: string
          format: date-time
          readOnly: true
        after_job:
          type: string
        after_job_tasks:
          type: array
          items:
            type: string
        error:
          type: string
    Alerts:
      type: object
      properties:
        send_email:
          type: boolean
        email_to:
          type: string
        email_subject:
          type: string
        email_error_only:
          type: boolean
    TransformationSettings:
      type: object
      properties:
        enable_parallel_processing:
          type: boolean
        worker_pool:
          type: integer
        verbosity:
          type: string
          enum:
            - None
            - Error
            - Info
            - Transfer
            - Verbose
        command_timeout:
          type: integer
          default: 300
        git_token:
          type: string
          description: dbt transformations.
        project_type:
          type: string
          description: dbt transformations.
        dbt_schema:
          type: string
          description: dbt transformations.
        git_repository_url:
          type: string
          description: dbt transformations.
        dbt_threads:
          type: integer
          default: 4
          description: dbt transformations.
        folder_path:
          type: string
          description: dbt transformations.
    Transformation:
      type: object
      properties:
        id:
          type: string
        workspace_id:
          type: string
        name:
          type: string
        type:
          type: string
        destination_connection:
          $ref: '#/components/schemas/EntityRef'
        trigger:
          $ref: '#/components/schemas/TransformationTrigger'
        alerts:
          $ref: '#/components/schemas/Alerts'
        settings:
          $ref: '#/components/schemas/TransformationSettings'
        permissions:
          $ref: '#/components/schemas/Permissions'
        labels:
          type: array
          items:
            type: string
        license_state:
          type: string
        license_message:
          type: string
        pipeline_id:
          type: string
        last_run:
          $ref: '#/components/schemas/JobLastRun'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        code:
          type: integer
          description: HTTP status code.
        message:
          type: string
          description: Short status message.
        error:
          type: string
          description: Detailed error description.
    EntityRef:
      type: object
      description: A lightweight reference to a related resource.
      properties:
        id:
          type: string
        name:
          type: string
        connector:
          type: string
          description: Present for connection references.
        error:
          type: string
          description: Populated if the reference could not be resolved.
    Permissions:
      type: object
      properties:
        can_update:
          type: boolean
        can_delete:
          type: boolean
        can_execute:
          type: boolean
        can_remove:
          type: boolean
    JobLastRun:
      type: object
      nullable: true
      properties:
        run_start_date:
          type: string
          format: date-time
        status:
          type: string
        details:
          type: string
        records_affected:
          type: integer
        job_history_id:
          type: string
  responses:
    TransformationList:
      description: One or more transformations
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/Transformation'
    BadRequest:
      description: The request was invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The caller does not have permission to access this resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-cdata-authtoken
      description: A Sync user auth token. Generate one via POST /v2/users/generate-token.
    BasicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication with a Sync user's username and password.

````