Bulk Operations API
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.
Endpoints
| 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 |
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"
}
}
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.
Bulk Restart
| 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.
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.
Bulk Terminate
| 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.
Bulk Remove
| 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.
Bulk Terminate and Remove
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.
Bulk Search
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.