Retry workflow jobs in batches¶
Retry the specified execution under a scheduled job, or all failed executions under the scheduled job. Interface success simply means that the bulk retry request was accepted.
POST $CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/{workflow_id}/executions/batch-retry
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. First query the workflow job list to determine the workflow, source scheduling job and the range that needs to be retried. Prepare personal access token and target workspace ID that can access the target workspace.
Confirm that the current identity has permission to run the target workflow and access permissions to the files and volumes referenced by the input.
Request body¶
Replace $WORKFLOW_ID, $CLOUDSIGMA_API_KEY, $WORKSPACE_ID, $SOURCE_DISPATCH_JOB_ID in the example with actual values.
curl -X POST "$CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/$WORKFLOW_ID/executions/batch-retry" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"source_dispatch_job_id": "'"$SOURCE_DISPATCH_JOB_ID"'",
"all_failed": true,
"request_id": "retry-20260828-001"
}'
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
workflow ID, located in the request path. |
Request body
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Source scheduled job ID. Cannot be empty. |
|
array or null |
No |
Execution ID to retry. Do not pass |
|
boolean or null |
No |
When filling in |
|
string |
Yes |
The unique identifier of this batch request. Cannot be empty. |
request_id identifies a request for the same select set, persists across retries, and respects byte length limits. Retrying with the same ID does not restart the run, nor does it guarantee that a partially started batch will succeed.
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"source_dispatch_job_id": "dispatch-source-001",
"dispatch_job_id": "dispatch-retry-001",
"status": "waiting",
"accepted_count": 1,
"replayed": false
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
Source scheduled job ID. |
|
string |
The ID of the scheduled job created or reused in this batch retry. |
|
string |
Current status of batch retry requests. Values: |
|
integer |
The number of executions that will be retried this time. |
|
boolean |
Whether it is a repeated request for the same |
Use the scheduled job ID in the response Query the workflow job list to confirm the status of retry execution.
Error response¶
The business error response only contains code and msg, but does not contain data.
{
"code": "ErrParamInvalid",
"msg": "请求参数无效"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Readable error message. |