Skip to main content

Workflows Commands

See Workflows module docs for permissions and data model.

soat list-workflows​

List workflows

  • Method: GET
  • Path: /api/v1/workflows

Usage​

soat list-workflows

Options​

--project-id​

—

  • Source: query
  • Required: no
  • Type: string

soat create-workflow​

Create a workflow

  • Method: POST
  • Path: /api/v1/workflows

Usage​

soat create-workflow --name <string> --states <array<object>> --transitions <array<object>>

Options​

--project-id​

—

  • Source: body
  • Required: no
  • Type: string
--name​

—

  • Source: body
  • Required: yes
  • Type: string
--description​

—

  • Source: body
  • Required: no
  • Type: string \| null
--states​

—

  • Source: body
  • Required: yes
  • Type: array<object>
--transitions​

—

  • Source: body
  • Required: yes
  • Type: array<object>
--payload-schema​

—

  • Source: body
  • Required: no
  • Type: object
--version-label​

Optional tag for the version this create archives, e.g. initial.

  • Source: body
  • Required: no
  • Type: string
  • Example: initial

soat get-workflow​

Get a workflow

  • Method: GET
  • Path: /api/v1/workflows/{workflow_id}

Usage​

soat get-workflow --workflow-id <string>

Options​

--workflow-id​

—

  • Source: path
  • Required: yes
  • Type: string

soat update-workflow​

Update a workflow

  • Method: PATCH
  • Path: /api/v1/workflows/{workflow_id}

Usage​

soat update-workflow --workflow-id <string>

Options​

--workflow-id​

—

  • Source: path
  • Required: yes
  • Type: string
--name​

—

  • Source: body
  • Required: no
  • Type: string
--description​

—

  • Source: body
  • Required: no
  • Type: string \| null
--states​

—

  • Source: body
  • Required: no
  • Type: array<object>
--transitions​

—

  • Source: body
  • Required: no
  • Type: array<object>
--payload-schema​

—

  • Source: body
  • Required: no
  • Type: object
--version-label​

Optional tag for the version this write creates, e.g. rewired. Ignored when the write changes no definition field, since no version is archived.

  • Source: body
  • Required: no
  • Type: string
  • Example: rewired
--expected-version​

Refuses the write unless the resource is at this version.

  • Source: body
  • Required: no
  • Type: unknown

soat delete-workflow​

Delete a workflow

  • Method: DELETE
  • Path: /api/v1/workflows/{workflow_id}

Usage​

soat delete-workflow --workflow-id <string>

Options​

--workflow-id​

—

  • Source: path
  • Required: yes
  • Type: string

soat list-workflow-versions​

List a workflow's versions

  • Method: GET
  • Path: /api/v1/workflows/{workflow_id}/versions

Usage​

soat list-workflow-versions --workflow-id <string>

Options​

--workflow-id​

—

  • Source: path
  • Required: yes
  • Type: string

soat get-workflow-version​

Fetch an archived workflow version

  • Method: GET
  • Path: /api/v1/workflows/{workflow_id}/versions/{version}

Usage​

soat get-workflow-version --workflow-id <string> --version <integer>

Options​

--workflow-id​

—

  • Source: path
  • Required: yes
  • Type: string
--version​

The archived version number

  • Source: path
  • Required: yes
  • Type: integer

soat restore-workflow-version​

Restore an archived workflow state machine

  • Method: POST
  • Path: /api/v1/workflows/{workflow_id}/versions/{version}/restore

Usage​

soat restore-workflow-version --workflow-id <string> --version <integer>

Options​

--workflow-id​

—

  • Source: path
  • Required: yes
  • Type: string
--version​

The archived version number

  • Source: path
  • Required: yes
  • Type: integer
--label​

Optional tag for the new version the restore archives. Defaults to restored from vN.

  • Source: body
  • Required: no
  • Type: string
  • Example: rollback to pre-rewire

soat create-workflow-migration​

Migrate a workflow's open tasks to one of its versions

  • Method: POST
  • Path: /api/v1/workflows/{workflow_id}/migrations

Usage​

soat create-workflow-migration --workflow-id <string> --to-version <integer>

Options​

--workflow-id​

The workflow whose tasks migrate.

  • Source: path
  • Required: yes
  • Type: string
--to-version​

The workflow version to move the open tasks onto.

  • Source: body
  • Required: yes
  • Type: integer
--state-map​

Current state name to a state the target version declares, applied to every task as migrate-task applies it to one.

  • Source: body
  • Required: no
  • Type: object<string, string>
--wait​

When omitted or false (default), the run is answered queued and settles in the background; poll get-workflow-migration. Pass true to answer once every task has settled.

  • Source: body
  • Required: no
  • Type: boolean
  • Default: false

soat get-workflow-migration​

Get a workflow migration

  • Method: GET
  • Path: /api/v1/workflows/{workflow_id}/migrations/{migration_id}

Usage​

soat get-workflow-migration --workflow-id <string> --migration-id <string>

Options​

--workflow-id​

The workflow whose tasks migrate.

  • Source: path
  • Required: yes
  • Type: string
--migration-id​

The workflow migration to read.

  • Source: path
  • Required: yes
  • Type: string
  • Example: wfl_mig_V1StGXR8Z5jdHi6B