查询工作流重新运行列表

列出一个工作流作业下的重新运行分支。

GET https://api.moi.matrixorigin.cn/v5/workflow/v2/workflow-apps/{workflow_id}/executions/{execution_id}/rerun-branches

调用前准备

先查询工作流作业列表,取得工作流 ID 和源作业 ID。准备可访问目标工作区的个人访问令牌和目标工作区 ID。

确认当前身份具有工作流读取权限,并选择目标工作区中该工作流的源执行。

请求参数

将示例中的 $WORKFLOW_ID、$EXECUTION_ID、$AI_STUDIO_API_KEY、$WORKSPACE_ID 替换为实际值。

curl "https://api.moi.matrixorigin.cn/v5/workflow/v2/workflow-apps/$WORKFLOW_ID/executions/$EXECUTION_ID/rerun-branches" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

参数

类型

是否必填

说明

workflow_id

string

是

工作流 ID,位于请求路径中。

execution_id

string

是

源作业 ID,位于请求路径中。

成功响应

{
  "code": "OK",
  "msg": "OK",
  "data": {
    "reruns": [
      {
        "rerun_id": "rerun-001",
        "branch_id": "branch-001",
        "case_id": "case-001",
        "source_execution_id": "exec-001",
        "node_key": "root.load",
        "mode": "rerun_current_and_downstream",
        "status": "running"
      }
    ]
  }
}

字段

类型

说明

data.reruns

object(对象数组)

重新运行分支列表。

data.reruns[].rerun_id

string

重跑计划 ID。

data.reruns[].branch_id

string

重跑分支 ID。

data.reruns[].case_id

string

运行 ID。

data.reruns[].source_branch_id

string

来源分支 ID。

data.reruns[].new_workflow_execution_id

string

新工作流执行 ID。

data.reruns[].source_execution_id

string

源执行 ID。

data.reruns[].source_case_id

string

源运行 ID。

data.reruns[].node_key

string

节点键。

data.reruns[].source_node_execution_id

string

源节点执行 ID。

data.reruns[].mode

string

处理模式。取值:rerun_current_and_downstream、rerun_downstream_with_revisions。

data.reruns[].status

string

状态。取值:initializing、ready、running、paused、succeeded、failed、cancelled。

data.reruns[].error

string

错误信息。

data.reruns[].created_at

string

创建时间。

data.reruns[].updated_at

string

更新时间。

错误响应

错误响应不包含 data。

{
  "code": "ErrNotFound",
  "msg": "资源不存在"
}

字段

类型

说明

code

string

错误代码。

msg

string

可读错误信息。

最后更新于