secure
deploy

Updates the current pipeline completely, or creates it if it doesn't exist, using the provided configuration. Before creating or updating, validates the provided configuration for schema compliance and integrity.

post/api/v1/pipelines

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v1/pipelines
  • Auth
    HTTP bearer

Query parameters

dry_runboolean

Only validate the provided configuration without making changes

Request body

object required

Example request

{
  "sources": {
    "psql": {
      "type": "cdc",
      "logging": {
        "level": "debug"
      },
      "connection": {
        "type": "postgresql",
        "host": "host.docker.internal",
        "port": 5432,
        "database": "chinook",
        "user": "postgres",
        "password": "postgres"
      },
      "tables": {
        "public.invoice": {
          "columns": [
            "billingaddress",
            "billingcity",
            "billingcountry",
            "billingpostalcode",
            "total",
            "customerid",
            "billingstate",
            "invoiceid",
            "invoicedate"
          ],
          "keys": [
            "invoiceid"
          ]
        },
        "public.track": {
          "columns": [
            "genreid",
            "milliseconds",
            "mediatypeid",
            "trackid",
            "composer",
            "bytes",
            "name",
            "albumid",
            "unitprice"
          ],
          "keys": [
            "trackid"
          ]
        },
        "public.mediatype": {
          "columns": [
            "mediatypeid",
            "name"
          ],
          "keys": [
            "mediatypeid"
          ]
        },
        "public.customer": {
          "columns": [
            "country",
            "firstname",
            "address",
            "city",
            "lastname",
            "phone",
            "postalcode",
            "customerid",
            "company",
            "state",
            "fax",
            "email",
            "supportrepid"
          ],
          "keys": [
            "customerid"
          ]
        },
        "public.genre": {
          "columns": [
            "genreid",
            "name"
          ],
          "keys": [
            "genreid"
          ]
        },
        "public.invoiceline": {
          "columns": [
            "quantity",
            "trackid",
            "invoicelineid",
            "invoiceid",
            "unitprice"
          ],
          "keys": [
            "invoicelineid"
          ]
        },
        "public.playlist": {
          "columns": [
            "playlistid",
            "name"
          ],
          "keys": [
            "playlistid"
          ]
        },
        "public.employee": {
          "columns": [
            "country",
            "firstname",
            "birthdate",
            "address",
            "city",
            "reportsto",
            "title",
            "employeeid",
            "hiredate",
            "lastname",
            "phone",
            "postalcode",
            "state",
            "fax",
            "email"
          ],
          "keys": [
            "employeeid"
          ]
        },
        "public.album": {
          "columns": [
            "albumid",
            "artistid",
            "title"
          ],
          "keys": [
            "albumid"
          ]
        },
        "public.artist": {
          "columns": [
            "name",
            "artistid"
          ],
          "keys": [
            "artistid"
          ]
        },
        "public.playlisttrack": {
          "columns": [
            "playlistid",
            "trackid"
          ],
          "keys": [
            "playlistid",
            "trackid"
          ]
        }
      }
    }
  },
  "targets": {
    "target": {
      "type": "redis",
      "host": "host.docker.internal",
      "port": 12002,
      "password": "test"
    }
  },
  "processors": {
    "target_data_type": "hash"
  },
  "jobs": [
    {
      "name": "chinook_customer",
      "source": {
        "schema": "public",
        "table": "Customer"
      },
      "output": [
        {
          "uses": "redis.write",
          "with": {
            "connection": "target",
            "key": {
              "expression": "concat(['CustomerId:', CustomerId])",
              "language": "jmespath"
            },
            "expire": 100
          }
        }
      ]
    }
  ]
}

Response

Pipeline created or updated successfully

action_idstring nullable

Example response

{
  "action_id": "1234567890"
}

Changes

    • breaking

      query request parameter dry_run list-of-types was narrowed by removing types null

    • breaking

      for the query request parameter dry_run, the type changed from no type to boolean

    • info

      api operation id pipelines_api_v1_pipelines_post removed and replaced with post_pipelines_api_v1_pipelines_post

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • warning

      added the new cdc_validation_error enum value to the /// response property for the response status

    • info

      added the optional property /// to the response with the status