Rerun from specified node¶
Creates a rerun branch from the specified node where the job has been executed. Successful creation does not mean that the branch is completed; please check the re-run details to confirm the status.
POST https://moi.matrixorigin.cn/newmoi/workflow/v2/workflow-apps/{workflow_id}/executions/{execution_id}/nodes/{node_key}/reruns
Preparation before calling¶
First View node rerun plan, and save its rerun_contract_hash and node execution ID if needed. Prepare a personal access token and target workspace ID that has access to the target workspace.
Request body¶
workflow_idstring- Workflow ID.
execution_idstring- Source job ID.
node_keystring- The node key to start the rerun from.
modestring- Rerun mode; must be taken from planned `available_modes`.
source_node_execution_idstring- The selected source node execution ID.
expected_rerun_contract_hashstring- The contract hash returned by the plan, used to avoid using expired plans.
valuesobject- Runtime input override value.
config_overrideobject- Node configuration override value.
reasonstring- Reason for rerun.
Request example
curl -X POST "https://moi.matrixorigin.cn/newmoi/workflow/v2/workflow-apps/$WORKFLOW_ID/executions/$EXECUTION_ID/nodes/$NODE_KEY/reruns" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"mode": "continue_from_node",
"expected_rerun_contract_hash": "'"$RERUN_CONTRACT_HASH"'"
}'
Successful response¶
codestring- `OK` when successful.
msgstring- `OK` when successful.
data.rerun.rerun_idstring- Rerun ID.
data.rerun.branch_idstring- New branch ID.
data.rerun.case_idstring- The case ID of the new branch.
data.rerun.source_execution_idstring- Source job ID.
data.rerun.node_keystring- The node key of the rerun starting point.
data.rerun.source_node_execution_idstring- Source node execution ID.
data.rerun.modestring- The actual rerun mode used.
data.rerun.statusstring- New branch status.
data.start_errorstring- Error message when starting; only returned if there is a value.
data.refresh_errorstring- Error message when refreshing; only returned if there is a value.
Successful response example
{
"code": "OK",
"msg": "OK",
"data": {
"rerun": {
"rerun_id": "rerun-001",
"branch_id": "branch-001",
"case_id": "case-001",
"source_execution_id": "exec-001",
"node_key": "root.load",
"source_node_execution_id": "node-exec-001",
"mode": "continue_from_node",
"status": "running"
}
}
}
Error response¶
codestring- Error code.
msgstring- Readable error message.
datanull- `null` in an error response.
Error response example
{
"code": "contract_drift_detected",
"msg": "重新运行计划已变化",
"data": null
}
Follow-up operations¶
View workflow rerun details confirms branch status.
Last updated on