Retry workflow job¶
Retry a workflow job. A successful request does not mean that the retry has been completed; please check the details of the new job to confirm the status.
POST $CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/{workflow_id}/executions/{execution_id}/retry
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
First query job details to confirm that the current status of the job supports retry.
Request¶
curl -X POST "$CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/$WORKFLOW_ID/executions/$EXECUTION_ID/retry" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"trigger_now": true
}'
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
workflow_id | string | Required | Workflow ID. |
execution_id | string | Required | The job ID to retry. |
values | object | Runtime input value to use when retrying. | |
trigger_now | boolean | Whether to trigger retry immediately. |
Successful response¶
Returns 200 on success. data.workflow_run returns the execution information corresponding to the retry request; saves the new execution ID for querying the status of the retry job.
The response fields are as follows.
In field paths, [] denotes each item in an array. For example, items[].name is the name field of each item in the items array. After a type, [] denotes an array; for example, string[] is an array of strings.
{
"code": "OK",
"msg": "OK",
"data": {
"workflow_run": {
"execution_id": "exec-002",
"workflow_id": "wf-001",
"status": "submitted",
"execution_mode": "one_shot"
}
}
}
| Field | Type | Description |
|---|---|---|
code | string | OK when successful. |
msg | string | OK when successful. |
data.workflow_run.execution_id | string | New job ID. |
data.workflow_run.workflow_id | string | Workflow ID. |
data.workflow_run.status | string | The current status of the new job. |
data.workflow_run.execution_mode | string | Workflow execution mode. |
data.workflow_run.available_actions | string[] | Currently available operations; only returned if there is a value. |
data.workflow_run.error | string | Job error message; only returned if there is an error. |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "请求参数无效",
"data": null
}
| Field | Type | Description |
|---|---|---|
code | string | Error code. |
msg | string | Readable error message. |
data | null | `null` in an error response. |
Follow-up operations¶
Use new execution ID query workflow job details.