Resume workflow job¶
Requests the resumption of a specified workflow job. A successful request only means that the server accepts the recovery operation; please check the job status again to confirm subsequent execution.
HTTP
POST $CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/{workflow_id}/executions/{execution_id}/resume
Before you call this API¶
Configure the regional API endpoint and authentication, and select the target workspace.
First query job details and check whether available_actions contains recovery.
Request¶
Shell
curl -X POST "$CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/$WORKFLOW_ID/executions/$EXECUTION_ID/resume" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workflow_id | string | Required | Workflow ID. |
execution_id | string | Required | Job ID. |
Successful response¶
Returns 200 on success. data.execution returns the current execution information processed by the server.
JSON
{
"code": "OK",
"msg": "OK",
"data": {
"execution": {
"execution_id": "exec-001",
"workflow_id": "wf-001",
"status": "running",
"available_actions": ["pause", "cancel"],
"execution_mode": "one_shot",
"input_payload": {},
"vars_payload": {}
}
}
}
| Field | Type | Description |
|---|---|---|
code | string | `OK` when successful. |
msg | string | `OK` when successful. |
data.execution.execution_id | string | Execution ID. |
data.execution.workflow_id | string | Workflow ID. |
data.execution.status | string | Current execution status. |
data.execution.available_actions | string[] | Currently allowed operations. |
data.execution.execution_mode | string | Execution mode. |
data.execution.cron_expression | string | Cron expression; only returned in timing mode. |
data.execution.input_payload | object | Expanded run input. |
data.execution.vars_payload | object | Expanded run variables. |
data.execution.moi_task_id | string | Task ID; returned when assigned by the server. |
data.execution.moi_case_id | string | Case ID; returned when assigned by the server. |
data.execution.moi_workflow_def_id | string | Workflow definition ID; returned when assigned by the server. |
data.execution.moi_workflow_version_id | string | Workflow version ID; returned when assigned by the server. |
data.execution.pause_scope | string | Pause scope; returned if there is a value. |
data.execution.error | string | Error; returned if there is a value. |
data.execution.started_at | string | Execution start time; returned if there is a value. |
data.execution.ended_at | string | Execution end time; returned if there is a value. |
data.execution.created_at | string | Execution creation time; returned if there is a value. |
data.execution.updated_at | string | Execution update time; returned if there is a value. |
Error response¶
JSON
{
"code": "ErrConflict",
"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 the same job ID query workflow job details to confirm recovery and continue tracking until completion.
Last updated on