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. Only the sessions on the requested page are read. 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.