CLI commands

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>
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--workflow-idstringYes

Required scope: write.

Example:

koast delete-workflow --brand 123 --workflow-id WORKFLOW_ID

get-workflow

Get workflow. GET /v1/brands/{brandId}/workflows/{workflowId}, API reference.

koast get-workflow --brand <brand> --workflow-id <workflow-id>
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--workflow-idstringYes

Required scope: read.

Example:

koast get-workflow --brand 123 --workflow-id WORKFLOW_ID

get-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>
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--workflow-idstringYes
--execution-idstringYes

Required scope: read.

Example:

koast get-workflow-execution --brand 123 --workflow-id WORKFLOW_ID --execution-id EXECUTION_ID

list-workflows

List workflows. GET /v1/brands/{brandId}/workflows, API reference.

koast list-workflows --brand <brand> [flags]
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--cursorstringNoOpaque cursor from the previous page's nextCursor. Omit for the first page.
--limitintegerNoPage 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 123

run-workflow

Run workflow. POST /v1/brands/{brandId}/workflows/{workflowId}/runs, API reference.

koast run-workflow --brand <brand> --workflow-id <workflow-id>
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--workflow-idstringYes

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_ID

save-workflow

Save workflow. POST /v1/brands/{brandId}/workflows, API reference.

koast save-workflow --brand <brand> --spec <spec> [--json <file|->] [flags]
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--workflow-idstringNo
--namestringNo
--typestringNoOne of visual, agent, template.
--specJSON objectYesFull 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.json

With 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|->]
FlagTypeRequiredDescription
--brandintegerYesThe brand the request acts on. Every brand-scoped resource lives under its brand.
--workflow-idstringYes
--statusstringYesOne 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

On this page