Skip to content

Pipelines API

All paths are relative to /api.

MethodPathDescription
POST/pipelinesCreate a pipeline
GET/pipelinesList pipelines
GET/pipelines/tagsList all tags in use
GET/pipelines/{id}Get a pipeline
PUT/pipelines/{id}Update a pipeline
DELETE/pipelines/{id}Delete a pipeline and its runs
POST/pipelines/{id}/duplicateCopy a pipeline
POST/pipelines/{id}/sync-streamsCreate pipelines for the source’s other streams
POST/pipelines/{id}/runTrigger a run
GET/pipelines/{id}/runsList a pipeline’s runs
GET/pipelines/runs/{run_id}Get a run
GET/pipelines/runs/{run_id}/logsGet a run’s logs
POST/pipelines/runs/{run_id}/cancelCancel a run
GET/pipelines/runs/{run_id}/downloadDownload a run’s output file
{
"id": "6f1c2e8a-...",
"name": "hubspot-contacts",
"config": { "name": "hubspot-contacts", "source": { ... }, "destination": { ... } },
"schedule": "0 */6 * * *",
"enabled": true,
"tags": ["crm", "production"],
"created_at": "2026-10-01T09:00:00",
"updated_at": "2026-10-02T10:30:00"
}

config is a full Bizon pipeline config as JSON. Timestamps are naive UTC.

POST /pipelines returns 201 with the pipeline.

FieldTypeRequiredDefault
namestringyes
configobjectyes
schedulestring (cron)nonull
enabledbooleannotrue
tagsstring[]no[]
Terminal window
curl -X POST http://localhost:8000/api/pipelines \
-H "Content-Type: application/json" \
-d '{
"name": "hubspot-contacts",
"config": {
"name": "hubspot-contacts",
"source": {
"name": "hubspot",
"stream": "contacts",
"authentication": {"type": "api_key", "params": {"token": "pat-xxx"}}
},
"destination": {
"name": "bigquery",
"config": {"project_id": "my-project", "dataset": "raw"}
}
},
"schedule": "0 */6 * * *",
"tags": ["crm"]
}'

The API validates the request before saving it:

  • schedule must parse as a cron expression, or you get 400.
  • The config goes through a security check. Transform code is parsed and rejected if it imports modules outside an allowlist or uses blocked builtins such as open, eval or getattr. YAML tags such as !!python/ are rejected in any string.
  • bizon-core must be able to build a runner from the config, or you get 400 with its error.
  • A duplicate name returns 409.

PUT /pipelines/{id} takes the same fields, all optional. Only the fields you send are changed. schedule and config are validated as on create.

Terminal window
curl -X PUT http://localhost:8000/api/pipelines/<id> \
-H "Content-Type: application/json" \
-d '{"enabled": false}'

GET /pipelines

QueryDefaultDescription
limit100Page size
offset0Offset
enabledtrue or false
tagsComma-separated. A pipeline must have all of the tags.
Terminal window
curl "http://localhost:8000/api/pipelines?tags=crm,production&enabled=true"

Results are sorted newest first. GET /pipelines/tags returns the sorted list of distinct tags.

POST /pipelines/{id}/duplicate copies the config, schedule and tags into a new pipeline named <name> (copy), or (copy 2) and so on. The copy is disabled.

POST /pipelines/{id}/sync-streams creates one pipeline for every other stream of the same source that has no pipeline yet. Each new pipeline:

  • is named <name>-<stream>;
  • copies the config with only source.stream changed;
  • copies the schedule, enabled flag and tags.

The streams come from the custom source’s streams() if the config has source_file_path, and from bizon’s source registry otherwise. The response is the list of created pipelines, which is empty if every stream already has one.

POST /pipelines/{id}/run creates a pending run and returns 201. The body is optional:

{ "triggered_by": "manual" }

It returns 409 if the pipeline already has a pending or running run. Disabled pipelines can still be run manually.

{
"id": "a3b9...",
"pipeline_id": "6f1c...",
"status": "success",
"triggered_by": "manual",
"started_at": "2026-10-02T10:30:01",
"finished_at": "2026-10-02T10:31:12",
"error": null,
"logs": null,
"log_file_path": "logs/6f1c.../a3b9....log",
"output_file": null,
"output_file_size": null,
"created_at": "2026-10-02T10:30:00"
}

status is one of pending, running, success, failed or cancelled. triggered_by is manual or schedule.

GET /pipelines/{id}/runs?limit=50 returns the newest runs first. limit is the only parameter.

GET /pipelines/runs/{run_id}/logs

{ "logs": "2026-10-02 10:30:02 | INFO | ..." }

logs is null until the run has finished.

POST /pipelines/runs/{run_id}/cancel marks a pending or running run as cancelled and returns it. The worker then stops the subprocess. Cancelling a finished run returns 400.

GET /pipelines/runs/{run_id}/download streams the output file of a run that used the file destination. The content type follows the extension (.jsonl, .csv, .parquet). It returns 404 if the run has no output file.