Visual pipelines API reference
Routes, permissions and request bodies for visual pipelines, drafts, versions, triggers, test runs, retries, pins, approvals and folders.
This page lists the visual pipelines API. For how visual pipelines behave, read Visual pipelines. For authentication and base paths, read API fundamentals.
All routes are under:
{api-base}/orgs/{org_id}/workspaces/{workspace_id}/vegaflow/visual-pipelinesPermissions are described in Visual pipelines › Permissions.
Routes
Where a row lists several routes, the permissions are in the same order.
Pipelines and folders
| Route | Permission |
|---|---|
GET /, POST / | list / type-level create |
GET /{id}, PATCH /{id}, DELETE /{id} | read / update / delete |
GET /recent-runs?workflow_id={id},{id} | list |
GET /{id}/export, POST /import | read / type-level create |
GET /folders, POST /folders, PATCH /folders/{folder_id}, DELETE /folders/{folder_id} | type-level list / create |
Drafts and versions
| Route | Permission |
|---|---|
GET /{id}/draft, PUT /{id}/draft, POST /{id}/compile | read / update |
POST /{id}/publish, POST /{id}/enable, POST /{id}/disable | publish |
GET /{id}/versions, GET /{id}/versions/{version_id} | read |
GET /{id}/draft/pins, PUT /{id}/draft/pins/{node_id}, DELETE /{id}/draft/pins/{node_id} | read / update |
Authoring and Turing proposals
| Route | Permission |
|---|---|
GET /authoring-catalog, GET /authoring-apps, POST /compile-check, GET /{id}/authoring, POST /{id}/compile-check | type-level list / read |
POST /{id}/proposals, GET /{id}/proposals/{proposal_id} | update / read |
POST /{id}/proposals/{proposal_id}/apply, POST /{id}/proposals/{proposal_id}/discard | update |
Run settings and triggers
| Route | Permission |
|---|---|
GET /{id}/run-settings, PUT /{id}/run-settings | read / update |
GET /{id}/trigger, POST /{id}/trigger/listen, GET /{id}/trigger/sample | read / update / read |
POST /{id}/trigger/webhook, PATCH /{id}/trigger/webhook, POST /{id}/trigger/webhook/rotate-secret | update |
Runs, tests and approvals
| Route | Permission |
|---|---|
POST /{id}/executions | execute |
GET /{id}/executions, GET /{id}/executions/{execution_id} | read |
POST /{id}/executions/{execution_id}/runs/{run_id}/retry | execute |
POST /{id}/executions/{execution_id}/cancel | execute |
POST /{id}/test-runs | update |
GET /{id}/approvals, POST /{id}/approvals/{approval_id}/decision | read / execute |
Save the draft
If-Match is the version you loaded. Send base_source, the source you loaded or last saved, so a save after someone else's merges instead of failing:
PUT /orgs/{org_id}/workspaces/{workspace_id}/vegaflow/visual-pipelines/{id}/draft
If-Match: "{draft_version}"
Content-Type: application/json
{ "source": "{graph JSON}", "base_source": "{graph JSON you loaded}" }| Case | Response |
|---|---|
| The versions match | The source is saved as sent. |
| The versions differ and the changes do not overlap | The merged draft is saved, and the response carries "merge": {"merged": true, "with": ["user:{id}"]}. |
The version is stale and base_source is missing | 409. |
| The changes overlap | 409 with code VISUAL_DRAFT_CONFLICT, the conflicts and the current draft. |
{
"code": "VISUAL_DRAFT_CONFLICT",
"conflicts": [{ "path": "", "node_id": "build_summary", "title": "Build summary", "kind": "both_changed" }],
"current": { "workflow": { "...": "..." }, "draft": { "resource_version": 7, "...": "..." } }
}kind is both_changed, changed_removed, both_added or field (a pipeline setting, with node_id field:<name>).
Resolve conflicts
Retry with If-Match set to current.draft.resource_version, the same base_source, and resolutions mapping each conflict to mine or theirs. The key is the node_id, or path/node_id for a step inside a branch, loop or error path:
{ "source": "{graph JSON}", "base_source": "{graph JSON you loaded}", "resolutions": { "build_summary": "mine" } }Resolutions count only against the version they were made for. If someone saved again in the meantime, the save merges again and may return new conflicts.
Applying a Turing proposal takes the same optional resolutions in its body and answers the same way. A proposal with a conflict stays pending.
Publish
The body is optional:
POST /orgs/{org_id}/workspaces/{workspace_id}/vegaflow/visual-pipelines/{id}/publish
If-Match: "{draft_version}"
Content-Type: application/json
{ "note": "Handle empty orders" }The note can be up to 200 characters.
Recent runs
Read the latest runs of up to 50 pipelines at once, as the pipeline list does. Each item holds the newest 30 production runs, with more set when there are older ones. Pipelines you cannot read are left out.
GET /orgs/{org_id}/workspaces/{workspace_id}/vegaflow/visual-pipelines/recent-runs?workflow_id={id},{id}A run's read shows "filtered": true when it ended at a filter.
Test runs
POST /orgs/{org_id}/workspaces/{workspace_id}/vegaflow/visual-pipelines/{id}/test-runs
Content-Type: application/json
{ "mode": "from_step", "node_id": "build_summary" }| Field | Description |
|---|---|
mode | whole, from_step or step. |
node_id | The step to test from, or the only step to test. |
input | The test event. Without it, the trigger's pin is used, then its sample. |
seed_run | {"execution_id", "run_id"}: use a past run's event and outputs instead. |
Retry a run
Retry a failed run from a step, with a fixed version:
POST /orgs/{org_id}/workspaces/{workspace_id}/vegaflow/visual-pipelines/{id}/executions/{execution_id}/runs/{run_id}/retry
Content-Type: application/json
{ "from_node": "build_summary", "version_id": "{version_id}" }Pin a step's output
PUT /orgs/{org_id}/workspaces/{workspace_id}/vegaflow/visual-pipelines/{id}/draft/pins/{node_id}
Content-Type: application/json
{ "value": { "total": 3 } }Pinned values are limited to 1 MiB.
Decide an approval
Each person's decision counts once. The approval is decided when enough people approve or anyone rejects.
POST /orgs/{org_id}/workspaces/{workspace_id}/vegaflow/visual-pipelines/{id}/approvals/{approval_id}/decision
If-Match: "{resource_version}"
Content-Type: application/json
{ "decision": "APPROVED", "values": { "likely_cause": "Cache stampede" } }An approval's read shows required_approvals, and approvals: the people who have approved so far, with when.
Custom agents API reference
Routes, request fields, permissions and error codes for custom agents, their versions, conversations, runs, triggers, overrides and policies.
Turing API reference
Routes, fields, limits and error codes for Turing question events, conversations, personal projects, instructions and project files.