Workflow API
POST {STUDIO_URL}/api/rpc/workflows.<procedure>Procedures
| Group | Procedures | Needs |
|---|---|---|
| Lifecycle | create get list update updateGraph publish pause resume delete versions.get | workflow: create to create; Viewer to read; Editor to change, publish, pause, resume; Admin to delete |
| Runs | runs.create runs.get runs.list runs.listAll runs.listNodes runs.getNodeResult runs.stream runs.cancel runs.resume | Viewer to read; Editor to start, cancel, resume |
| Approvals | approvals.listMine approvals.listHandled approvals.get approvals.answer | Being an approver on the step |
| Schedules | schedules.list schedules.get schedules.history (read only; last 7 days by default) | Viewer |
| App accounts | toolkits.list toolkits.bind toolkits.unbind | Viewer (your own accounts) |
| Sharing | sharing.share sharing.unshare sharing.grants sharing.searchCandidates | Admin |
| Assistant | assistant | Any member |
Start a run and wait for the result
const run = await client.workflows.runs.create({
workflowId,
input: { invoiceId: "INV-2041" },
requestIdempotencyKey: uuidv7(),
wait: "result", // hold the call up to 30 s; "none" returns at once
});- Runs the published version unless you pass a
versionId. inputis checked against the Trigger's declared inputs.- Repeating the same
requestIdempotencyKeyreturns the same run.
Follow progress
for await (const event of client.workflows.runs.stream({
workflowId,
runId: run.id,
})) {
console.log(event); // step and run status changes, no item data
}
const result = await client.workflows.runs.getNodeResult({
workflowId,
runId: run.id,
nodeId,
iteration: 0,
}); // a step's input and output itemsAnswer an approval
await client.workflows.approvals.answer({
runId,
nodeId,
iteration: 0,
decision: "approved",
fields: { reason: "Within policy" },
});Filters on runs.list / runs.listAll
status[] (RUNNING, SUSPENDED, SUCCEEDED, FAILED, CANCELLED), triggerType[]
(MANUAL, SCHEDULE, WORKFLOW), from, to, plus cursor and limit (1–100,
default 50).
Pause and resume
workflows.pause stops a workflow's schedules from firing, an emergency stop;
workflows.resume turns them back on. Both need Editor. These are API only for
now; there is no button in the builder yet.