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.

HTTP
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.

Shell
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

workflow_id

string

Yes

workflow ID.

execution_id

string

Yes

New job ID.

Request body

Field

Type

Required

Description

values

object or null

No

Runtime input value to use when retrying.

replace_saved_defaults

boolean or null

No

Whether to replace the saved default value.

trigger_now

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

JSON
{
  "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

data.workflow_run

object

Execution information for the new job.

data.workflow_run.execution_id

string

Execution ID.

data.workflow_run.workflow_id

string

workflow ID.

data.workflow_run.status

string

status. Values: preparing, waiting, pending, triggered, running, completed, failed, cancelled, submitted, scheduled, paused, canceled, success, succeeded, queued, cancelling, canceling.

data.workflow_run.available_actions

array of string

Available operations.

data.workflow_run.execution_mode

string

Execution method. Values: one_shot, volume_trigger, cron, dynamic_service, task_by_version.

data.workflow_run.moi_task_id

string

CloudSigma task ID.

data.workflow_run.moi_case_id

string

CloudSigma run ID.

data.workflow_run.moi_workflow_def_id

string

CloudSigma workflow definition ID.

data.workflow_run.moi_workflow_version_id

string

CloudSigma workflow version ID.

data.workflow_run.error

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.

JSON
{
  "code": "ErrParamInvalid",
  "msg": "请求参数无效"
}

Field

Type

Description

code

string

error code.

msg

string

Readable error message.

Last updated on