Skip to main content
In plain terms: use these calls to save, check and read your workflows (a session is the folder they live in). Validate first to catch mistakes without saving anything.
A session groups workflows, executions and configuration. These endpoints create or replace a session, check a draft workflow, and read sessions back. The calls that read or change one workflow inside a session are on the Workflows page. Every response uses the envelope.

Apply a session

POST /api/sessions Creates a session, or replaces an existing one with the same sessionId. The call validates and prepares every workflow it contains. Workflows that the session had before and the request leaves out are removed, so always send the complete configuration. To edit a session, read it with GET /api/sessions/{sessionId}/config, change it and send it back. Because workflows can run processes, scripts and SQL, applying a session needs the ADMIN role. Request body Workflow definition Response 200: no data; the message is Configuration applied successfully. Errors: 400 for invalid fields or a workflow that fails validation, 403 for a role below ADMIN.

Validate a draft workflow

POST /api/sessions/validate Checks one workflow with the same rules that run before execution, and saves nothing. Editors use it to give feedback before a save. A draft that fails is still a 200 response, with valid set to false, so you can tell a rejected draft from a failed request. The result also lists each node’s output ports for its current configuration, which tells an editor which sourcePort values are valid. Request body: one workflow definition, the same shape as an entry of workflows above. Response data Errors: 400 when the body itself is malformed, 403 for a role below ADMIN.

List sessions

GET /api/sessions Returns session ids in alphabetical order. Response data: an array of session ids. When more remain, the X-Next-Cursor header holds the cursor for the next page.

List session summaries

GET /api/sessions/summaries Returns one lean row per session, ordered by session id, for tables. The rows come from one read of the session settings and workflow counts; the workflow definitions are not loaded. A session that cannot be read is skipped. It takes the same limit and cursor parameters and the same X-Next-Cursor header as the list above. Response data: an array of rows.

Get session details

GET /api/sessions/{sessionId} Returns the session’s metadata and the ids of its workflows. Response data: the fields of a summary row, with workflowIds (an array of workflow ids) instead of workflowCount. Errors: 404 if the session does not exist.

Get the full configuration

GET /api/sessions/{sessionId}/config Returns the complete configuration in the shape that POST /api/sessions accepts: the metadata, the tags with their values, and every workflow definition. Read it, change it and send it back to edit a session. The web UI’s editor works this way. Response data: the fields of the apply request (sessionId, name, description, initiator, tags, projectPath, workflows). Errors: 404 if the session does not exist.

List a session’s workflows

GET /api/sessions/{sessionId}/workflows Returns one summary per workflow with its size and the status of its latest run. Response data Errors: 404 if the session does not exist.

Delete a session or a workflow

DELETE /api/sessions/{sessionId} and DELETE /api/sessions/{sessionId}/workflows/{workflowId} Removes the session (or the workflow) with its definition, its saved versions and the compiled copy. The run history and the logs stay: they are not purged and age out with the log retention, so a deleted workflow’s runs can still be read. Pending approvals and triggers belong to running work and end with it. A run is active while it is running, queued, paused or waiting for a signal. Without force, active runs make the call answer 409 and name their ids; so does a forced delete whose runs do not end in time. An unknown session or workflow answers 404. Success answers 204 with no body. Only ADMIN keys may delete; a key limited to sessions may delete only its own. Every delete is recorded in the control audit with the actor, the target and the force flag.

Next steps

Workflows API

Read workflow definitions and graphs, manage saved versions, and start, stop and list runs of a workflow.

Defining a workflow

The complete JSON shape of a session and its workflows, and how to build one step by step.

Validation and versions

Check a workflow definition before it runs, and diff, annotate and roll back its saved versions.