Skip to main content

GET /api/v1/pipelines

List all pipelines with their nodes, edges, connector, and schema references.

Query Parameters

ParameterTypeDefaultDescription
limitinteger20Max results per page
cursorstringCursor for pagination

Response

{
  "data": [
    {
      "id": "pipe_001",
      "name": "Customer Import",
      "description": "Daily customer data sync from Snowflake",
      "status": "active",
      "schedule": "0 2 * * *",
      "executionConfig": { "batchSize": 5000, "parallelism": 4 },
      "connector": { "id": "conn_001", "name": "Production Snowflake", "type": "snowflake" },
      "schema": { "id": "schema_001", "name": "customers", "displayName": "Customers" },
      "nodes": [],
      "edges": [],
      "createdAt": "2026-01-15T09:00:00.000Z"
    }
  ],
  "total": 3,
  "hasMore": false
}

POST /api/v1/pipelines

Create a new pipeline with optional nodes and edges.

Request Body

FieldTypeRequiredDescription
namestringYesPipeline name
connectorIdstringYesSource connector ID
schemaIdstringYesTarget schema ID
descriptionstringNoDescription
schedulestringNoCron expression for scheduled execution
executionConfigobjectNoExecution settings (batchSize, parallelism, partitioning)
nodesarrayNoPipeline flow nodes (see node object)
edgesarrayNoConnections between nodes

Node Object

FieldTypeDescription
idstringTemporary node ID (used for edge mapping)
nodeTypestringNode type: "source", "transform", "filter", "target", etc.
labelstringDisplay label
configobjectType-specific configuration
positionobject{ x: number, y: number } for visual editor

Edge Object

FieldTypeDescription
sourcestringSource node temp ID
targetstringTarget node temp ID
labelstringEdge label

Example

curl -X POST https://playground.kaireonai.com/api/v1/pipelines \
  -H "Content-Type: application/json" \
  -H "X-Tenant-Id: my-tenant" \
  -d '{
    "name": "Customer Import",
    "connectorId": "conn_001",
    "schemaId": "schema_001",
    "schedule": "0 2 * * *",
    "executionConfig": { "batchSize": 5000, "parallelism": 4 },
    "nodes": [
      { "id": "n1", "nodeType": "source", "label": "Snowflake Source", "config": {} },
      { "id": "n2", "nodeType": "transform", "label": "Rename Fields", "config": { "type": "rename_field" } },
      { "id": "n3", "nodeType": "target", "label": "Customer Table", "config": {} }
    ],
    "edges": [
      { "source": "n1", "target": "n2" },
      { "source": "n2", "target": "n3" }
    ]
  }'
Response: 201 Created

PUT /api/v1/pipelines

Update a pipeline. When nodes are provided, existing nodes and edges are replaced entirely.

Request Body

FieldTypeRequiredDescription
idstringYesPipeline ID
namestringNoUpdated name
descriptionstringNoUpdated description
schedulestringNoUpdated cron schedule
executionConfigobjectNoUpdated execution config
nodesarrayNoReplaces all nodes
edgesarrayNoReplaces all edges (requires nodes)
Response: 200 OK

DELETE /api/v1/pipelines

Delete a pipeline and its nodes/edges.
ParameterTypeRequiredDescription
idstringYesPipeline ID (query parameter)
Response: 204 No Content

POST /api/v1/pipelines//run

Trigger a pipeline execution. Creates a PipelineRun record and enqueues the job via BullMQ for worker pod processing.

Response

{
  "id": "run_001",
  "pipelineId": "pipe_001",
  "status": "pending",
  "createdAt": "2026-03-16T14:30:00.000Z"
}
Response: 201 Created

GET /api/v1/pipelines//runs

List recent execution runs for a pipeline (last 20 runs, newest first).

Response

[
  {
    "id": "run_001",
    "pipelineId": "pipe_001",
    "status": "completed",
    "createdAt": "2026-03-16T02:00:00.000Z",
    "completedAt": "2026-03-16T02:05:30.000Z"
  }
]

Roles

EndpointAllowed Roles
GET /pipelinesadmin, editor, viewer
POST /pipelinesadmin, editor
PUT /pipelinesadmin, editor
DELETE /pipelinesadmin, editor
POST /pipelines/{id}/runadmin, editor
GET /pipelines/{id}/runsany authenticated
See also: Data Platform