Retry workflow job¶
Create retry execution for a workflow job. A successful request does not mean that the retry has been completed. Please continue to check the status of new jobs.
POST $CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/{workflow_id}/executions/{execution_id}/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 details and confirm that the job is currently allowed to be retried. Prepare personal access token and target workspace ID that can access the target workspace.
Select the source that has entered the final state for execution.
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, $EXECUTION_ID, $CLOUDSIGMA_API_KEY, $WORKSPACE_ID in the example with actual values.
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
}'
Retrying creates a new execution, using the current version of the workflow and retaining scheduling constraints.
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
workflow ID. |
|
string |
Yes |
New job ID. |
Request body
Field |
Type |
Required |
Description |
|---|---|---|---|
|
object or null |
No |
Runtime input value to use when retrying. |
|
boolean or null |
No |
Whether to replace the saved default value. |
|
boolean or null |
No |
Whether to trigger a retry immediately. |
Omitting values, null, or {} will not clear the saved input. Non-empty values or explicit trigger_now will enter the normal startup form binding path. Simply providing replace_saved_defaults will not switch to that path. replace_saved_defaults controls the replacement of saved default values, and trigger_now controls whether to trigger immediately.
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"workflow_run": {
"execution_id": "exec-002",
"workflow_id": "wf-001",
"status": "submitted",
"available_actions": [],
"execution_mode": "one_shot",
"moi_task_id": "",
"moi_case_id": "",
"moi_workflow_def_id": "",
"moi_workflow_version_id": ""
}
}
}
Field |
Type |
Description |
|---|---|---|
|
object |
Execution information for the new job. |
|
string |
Execution ID. |
|
string |
workflow ID. |
|
string |
status. Values: |
|
array of string |
Available operations. |
|
string |
Execution method. Values: |
|
string |
CloudSigma task ID. |
|
string |
CloudSigma run ID. |
|
string |
CloudSigma workflow definition ID. |
|
string |
CloudSigma workflow version ID. |
|
string |
error message. |
Error response¶
The new execution may have been saved before the request returned an error. After failure, query the running records first and do not automatically submit again.
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. |