See Stacksync in action with a solution architect. Book a demo ↗
Workflows

Workflows

Run workflow

POST
/v1/workspaces/{workspace_id}/workflows/{workflow_id}/runs

Run a workflow now from its input step's test data, replay a finished run (all steps, failed steps, failed steps and the steps after them, up to a step, from a step), or run one step. Follow the run with list-logs.

Authorization

Authorizationstringheaderrequired

Bearer <key>, where <key> is a workspace API key or a user API key. See Authentication.

Path Parameters

workspace_id*integer

The workspace. List the ones your key can reach with GET /v1/workspaces.

workflow_id*string

The workflow.

Formatuuid

Query Parameters

region*Regions

Region of the resource: besg (Europe) or usnv (United States), as GET /v1/regions lists them

Value in"besg""usnv"

Header Parameters

Idempotency-Key?|

Makes the create retry-safe for 24 hours: a retry with the same key answers the resource the first call created, with the Idempotent-Replayed: true header, and creates nothing. 1 to 255 visible ASCII characters. The same key with a different request answers 422; while the first call still runs, 409.

Defaultnull

Request Body

application/json
  1. body
mode?RunMode

run: a new run from the input step's test data; the replay modes need from_run_id

Default"run"
Value in"run""replay_all""replay_failed""replay_failed_and_dependents""until_step""step_only""from_step"
version?|

The version run; the latest when absent

Defaultnull
from_run_id?|

The finished run whose data is replayed

Defaultnull
step_id?|

The step of the until_step, step_only and from_step modes

Defaultnull

Response Body

Created

application/json
  1. response
run_id*Run Id
workflow_id*Workflow Id
workflow_version?|
Defaultnull
created_time?|
Defaultnull
Run workflow
curl -X POST 'https://api.stacksync.com/v1/workspaces/0/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08/runs?region=besg' \  -H 'Content-Type: application/json' \  -d '{  "mode": "run"}'
{  "run_id": "<run_id>",  "workflow_id": "<workflow_id>",  "workflow_version": "<workflow_version>",  "created_time": "<created_time>"}