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-pipelines

Permissions are described in Visual pipelines › Permissions.

Routes

Where a row lists several routes, the permissions are in the same order.

Pipelines and folders

RoutePermission
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 /importread / type-level create
GET /folders, POST /folders, PATCH /folders/{folder_id}, DELETE /folders/{folder_id}type-level list / create

Drafts and versions

RoutePermission
GET /{id}/draft, PUT /{id}/draft, POST /{id}/compileread / update
POST /{id}/publish, POST /{id}/enable, POST /{id}/disablepublish
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

RoutePermission
GET /authoring-catalog, GET /authoring-apps, POST /compile-check, GET /{id}/authoring, POST /{id}/compile-checktype-level list / read
POST /{id}/proposals, GET /{id}/proposals/{proposal_id}update / read
POST /{id}/proposals/{proposal_id}/apply, POST /{id}/proposals/{proposal_id}/discardupdate

Run settings and triggers

RoutePermission
GET /{id}/run-settings, PUT /{id}/run-settingsread / update
GET /{id}/trigger, POST /{id}/trigger/listen, GET /{id}/trigger/sampleread / update / read
POST /{id}/trigger/webhook, PATCH /{id}/trigger/webhook, POST /{id}/trigger/webhook/rotate-secretupdate

Runs, tests and approvals

RoutePermission
POST /{id}/executionsexecute
GET /{id}/executions, GET /{id}/executions/{execution_id}read
POST /{id}/executions/{execution_id}/runs/{run_id}/retryexecute
POST /{id}/executions/{execution_id}/cancelexecute
POST /{id}/test-runsupdate
GET /{id}/approvals, POST /{id}/approvals/{approval_id}/decisionread / 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}" }
CaseResponse
The versions matchThe source is saved as sent.
The versions differ and the changes do not overlapThe merged draft is saved, and the response carries "merge": {"merged": true, "with": ["user:{id}"]}.
The version is stale and base_source is missing409.
The changes overlap409 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" }
FieldDescription
modewhole, from_step or step.
node_idThe step to test from, or the only step to test.
inputThe 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.

Vegalake, VegaDB and VegaFlow are trademarks or registered trademarks of Vegalake Inc.

On this page