docs/documentation/api/bulk.md
The Bulk Operations API lets you perform workflow management operations on multiple workflows in a single request. All endpoints use the base path /api/workflow/bulk.
Every endpoint accepts a list of workflow IDs in the request body and returns a BulkResponse:
{
"bulkSuccessfulResults": ["workflow-id-1", "workflow-id-2"],
"bulkErrorResults": {
"workflow-id-3": "Workflow is not in a running state"
}
}
Operations are best-effort — each workflow is processed independently. If one fails, the rest still proceed.
| Endpoint | Method | Description |
|---|---|---|
/bulk/pause | PUT | Pause multiple workflows |
/bulk/resume | PUT | Resume multiple paused workflows |
/bulk/restart | POST | Restart multiple completed workflows |
/bulk/retry | POST | Retry the last failed task in multiple workflows |
/bulk/terminate | POST | Terminate multiple running workflows |
/bulk/remove | DELETE | Remove multiple workflows from the system |
/bulk/terminate-remove | DELETE | Terminate and remove multiple workflows |
/bulk/search | POST | Search/fetch multiple workflows by ID |
PUT /api/workflow/bulk/pause
curl -X PUT 'http://localhost:8080/api/workflow/bulk/pause' \
-H 'Content-Type: application/json' \
-d '["workflow-id-1", "workflow-id-2", "workflow-id-3"]'
Response 200 OK
{
"bulkSuccessfulResults": ["workflow-id-1", "workflow-id-2"],
"bulkErrorResults": {
"workflow-id-3": "Workflow is already paused"
}
}
PUT /api/workflow/bulk/resume
curl -X PUT 'http://localhost:8080/api/workflow/bulk/resume' \
-H 'Content-Type: application/json' \
-d '["workflow-id-1", "workflow-id-2"]'
Response 200 OK — returns a BulkResponse.
POST /api/workflow/bulk/restart?useLatestDefinitions=false
| Parameter | Description | Default |
|---|---|---|
useLatestDefinitions | Use latest workflow and task definitions | false |
curl -X POST 'http://localhost:8080/api/workflow/bulk/restart?useLatestDefinitions=true' \
-H 'Content-Type: application/json' \
-d '["workflow-id-1", "workflow-id-2"]'
Response 200 OK — returns a BulkResponse.
POST /api/workflow/bulk/retry
Retries the last failed task for each workflow.
curl -X POST 'http://localhost:8080/api/workflow/bulk/retry' \
-H 'Content-Type: application/json' \
-d '["workflow-id-1", "workflow-id-2"]'
Response 200 OK — returns a BulkResponse.
POST /api/workflow/bulk/terminate?reason=
| Parameter | Description | Required |
|---|---|---|
reason | Reason for termination | No |
curl -X POST 'http://localhost:8080/api/workflow/bulk/terminate?reason=batch+cleanup' \
-H 'Content-Type: application/json' \
-d '["workflow-id-1", "workflow-id-2", "workflow-id-3"]'
Response 200 OK — returns a BulkResponse.
DELETE /api/workflow/bulk/remove?archiveWorkflow=true
| Parameter | Description | Default |
|---|---|---|
archiveWorkflow | Archive before removing | true |
curl -X DELETE 'http://localhost:8080/api/workflow/bulk/remove' \
-H 'Content-Type: application/json' \
-d '["workflow-id-1", "workflow-id-2"]'
!!! warning This permanently removes workflow execution data.
Response 200 OK — returns a BulkResponse.
DELETE /api/workflow/bulk/terminate-remove?reason=&archiveWorkflow=true
Terminates running workflows and removes them in one call.
| Parameter | Description | Default |
|---|---|---|
reason | Reason for termination | — |
archiveWorkflow | Archive before removing | true |
curl -X DELETE 'http://localhost:8080/api/workflow/bulk/terminate-remove?reason=decommissioned' \
-H 'Content-Type: application/json' \
-d '["workflow-id-1", "workflow-id-2"]'
Response 200 OK — returns a BulkResponse.
POST /api/workflow/bulk/search?includeTasks=true
Fetches multiple workflows by their IDs in a single call. Unlike the other bulk endpoints, this returns workflow objects rather than a BulkResponse.
| Parameter | Description | Default |
|---|---|---|
includeTasks | Include task details | true |
curl -X POST 'http://localhost:8080/api/workflow/bulk/search?includeTasks=false' \
-H 'Content-Type: application/json' \
-d '["workflow-id-1", "workflow-id-2"]'
Response 200 OK — returns a BulkResponse where bulkSuccessfulResults contains the full workflow objects.