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

Workflow runs

Replay executions

POST
/v1/workspaces/{workspace_id}/workflows/id/{workflow_id}/executions/batch-create

Replay chosen runs (workflow_execution_ids, or a query) with a replay mode (metadata.run_mode_details.run_mode), each with its own version or the version given.

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?|

Region of the workflow: besg or usnv. Required, except when List workflow runs reads several workflows through options.workflows

Defaultnull

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

The documented batch-create body (the query and legacy search_options forms are still accepted)

workflow_execution_ids?JsonValue
Defaultnull
query?JsonValue
Defaultnull
query_string?JsonValue
Defaultnull
search_options?JsonValue
Defaultnull
metadata?JsonValue
Defaultnull
workflow_version?JsonValue
Defaultnull
workflow_trigger_module_id?JsonValue
Defaultnull
validate_only?Validate Only

Run every check of the write and answer 204 without writing: a refused write answers the error the write would

Defaultfalse

Response Body

OK

application/json
  1. response
total_requested*Total Requested
total_succeeded*Total Succeeded
total_failed*Total Failed
errors*array<>
run_ids?array<string>
Default[]
resolved_count?|
Defaultnull
replay_batch_id?|
Defaultnull
Replay executions
curl -X POST 'https://api.stacksync.com/v1/workspaces/0/workflows/id/497f6eca-6276-4993-bfeb-53cbbbba6f08/executions/batch-create' \  -H 'Content-Type: application/json' \  -d '{  "workflow_execution_ids": [    "8d4f2a6c-1e3b-4c7a-9f05-6b2d8e1a3c47"  ]}'
{  "total_requested": 0,  "total_succeeded": 0,  "total_failed": 0,  "errors": [    {      "error": "<error>",      "message": "<message>"    }  ],  "run_ids": [],  "resolved_count": 0,  "replay_batch_id": "<replay_batch_id>"}