Cancel workflow rerun

Request to cancel a workflow and rerun a branch. A successful request does not mean that the branch has been stopped; please read the return status to confirm the actual status.

HTTP
POST $CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/{workflow_id}/executions/{execution_id}/reruns/{rerun_id}/cancel

Before you call this API

Configure the regional API endpoint and authentication, and select the target workspace.

First query rerun details to confirm that the current status of the branch allows cancellation.

Request

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/$WORKFLOW_ID/executions/$EXECUTION_ID/reruns/$RERUN_ID/cancel" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Path parameters

FieldTypeDescription
workflow_idstringWorkflow ID.
execution_idstringSource job ID.
rerun_idstringRerun ID.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "rerun": {
      "rerun_id": "rerun-001",
      "branch_id": "branch-001",
      "source_execution_id": "exec-001",
      "mode": "continue_from_node",
      "status": "cancelled"
    }
  }
}
FieldTypeDescription
codestring`OK` when successful.
msgstring`OK` when successful.
data.rerun.rerun_idstringRerun ID.
data.rerun.branch_idstringBranch ID.
data.rerun.source_execution_idstringSource job ID; returned only if there is a value.
data.rerun.modestringRerun mode.
data.rerun.statusstringThe branch status when the cancellation operation returns.
data.rerun.errorstringBranch error information; only returned when there is an error.

Error response

JSON
{
  "code": "ErrNotFound",
  "msg": "资源不存在",
  "data": null
}
FieldTypeDescription
codestringError code.
msgstringReadable error message.
datanull`null` in an error response.

Follow-up operations

View workflow rerun details confirms the final status.

Last updated on