Workflows commands
The 7 koast CLI commands for the Workflows operations.
Every command is one API operation, named by its operationId. Global flags such as --output and --api-url work on all of them, see CLI commands.
delete-workflow
Delete workflow. DELETE /v1/brands/{brandId}/workflows/{workflowId}, API reference.
koast delete-workflow --brand <brand> --workflow-id <workflow-id>| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
--workflow-id | string | Yes |
Required scope: write.
Example:
koast delete-workflow --brand 123 --workflow-id WORKFLOW_IDget-workflow
Get workflow. GET /v1/brands/{brandId}/workflows/{workflowId}, API reference.
koast get-workflow --brand <brand> --workflow-id <workflow-id>| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
--workflow-id | string | Yes |
Required scope: read.
Example:
koast get-workflow --brand 123 --workflow-id WORKFLOW_IDget-workflow-execution
Get workflow execution. GET /v1/brands/{brandId}/workflows/{workflowId}/executions/{executionId}, API reference.
koast get-workflow-execution --brand <brand> --workflow-id <workflow-id> --execution-id <execution-id>| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
--workflow-id | string | Yes | |
--execution-id | string | Yes |
Required scope: read.
Example:
koast get-workflow-execution --brand 123 --workflow-id WORKFLOW_ID --execution-id EXECUTION_IDlist-workflows
List workflows. GET /v1/brands/{brandId}/workflows, API reference.
koast list-workflows --brand <brand> [flags]| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
--cursor | string | No | Opaque cursor from the previous page's nextCursor. Omit for the first page. |
--limit | integer | No | Page size. Default 50. Minimum 1, maximum 100. |
Required scope: read. Paged. --all follows nextCursor to the end and prints one JSON line per item.
Example:
koast list-workflows --brand 123run-workflow
Run workflow. POST /v1/brands/{brandId}/workflows/{workflowId}/runs, API reference.
koast run-workflow --brand <brand> --workflow-id <workflow-id>| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
--workflow-id | string | Yes |
Required scope: write. Accepts --idempotency-key. The CLI sends a key only when you give one.
Example:
koast run-workflow --brand 123 --workflow-id WORKFLOW_IDsave-workflow
Save workflow. POST /v1/brands/{brandId}/workflows, API reference.
koast save-workflow --brand <brand> --spec <spec> [--json <file|->] [flags]| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
--workflow-id | string | No | |
--name | string | No | |
--type | string | No | One of visual, agent, template. |
--spec | JSON object | Yes | Full workflow spec: { name, type, trigger, triggerAdded, nodes[], agentPrompt? } |
Required scope: write. Accepts --idempotency-key. The CLI sends a key only when you give one. --json <file|-> supplies the whole body. Body flags are applied over it.
Example:
koast save-workflow --brand 123 --json body.jsonWith body.json:
{
"workflowId": "string",
"name": "string",
"type": "visual",
"spec": {}
}set-workflow-status
Set workflow status. PATCH /v1/brands/{brandId}/workflows/{workflowId}/status, API reference.
koast set-workflow-status --brand <brand> --workflow-id <workflow-id> --status <status> [--json <file|->]| Flag | Type | Required | Description |
|---|---|---|---|
--brand | integer | Yes | The brand the request acts on. Every brand-scoped resource lives under its brand. |
--workflow-id | string | Yes | |
--status | string | Yes | One of DRAFT, ACTIVE, PAUSED. |
Required scope: write. --json <file|-> supplies the whole body. Body flags are applied over it.
Example:
koast set-workflow-status --brand 123 --workflow-id WORKFLOW_ID --status DRAFT