# View workflow reruns

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

List rerun branches under a job.

```text
GET https://moi.matrixorigin.cn/newmoi/workflow/v2/workflow-apps/{workflow_id}/executions/{execution_id}/rerun-branches
```

## Preparation before calling

First [query the workflow job list](../workflow-jobs/list-workflow-jobs.md) to obtain the workflow ID and source job execution ID. Prepare a personal access token and target workspace ID that has access to the target workspace.



## Path parameters

::::{div} mo-api-split
:::{div} mo-api-split-main

```{raw} html
<dl class="mo-api-fields">
<div class="mo-api-field"><dt><code>workflow_id</code><span class="mo-api-field__type">string</span></dt><dd>Workflow ID.</dd></div>
<div class="mo-api-field"><dt><code>execution_id</code><span class="mo-api-field__type">string</span></dt><dd>Source job ID.</dd></div>
</dl>
```

:::
:::{div} mo-api-split-aside

```{raw} html
<p class="mo-api-example-label">Request example</p>
```

```bash
curl "https://moi.matrixorigin.cn/newmoi/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"
```

:::
::::

## Successful response

::::{div} mo-api-split
:::{div} mo-api-split-main

```{raw} html
<dl class="mo-api-fields">
<div class="mo-api-field"><dt><code>code</code><span class="mo-api-field__type">string</span></dt><dd>`OK` when successful.</dd></div>
<div class="mo-api-field"><dt><code>msg</code><span class="mo-api-field__type">string</span></dt><dd>`OK` when successful.</dd></div>
<div class="mo-api-field"><dt><code>data.reruns[]</code><span class="mo-api-field__type">array</span></dt><dd>Rerun branch list.</dd></div>
<div class="mo-api-field"><dt><code>data.reruns[].rerun_id</code><span class="mo-api-field__type">string</span></dt><dd>Rerun ID.</dd></div>
<div class="mo-api-field"><dt><code>data.reruns[].branch_id</code><span class="mo-api-field__type">string</span></dt><dd>Branch ID.</dd></div>
<div class="mo-api-field"><dt><code>data.reruns[].case_id</code><span class="mo-api-field__type">string</span></dt><dd>Case ID.</dd></div>
<div class="mo-api-field"><dt><code>data.reruns[].source_execution_id</code><span class="mo-api-field__type">string</span></dt><dd>Source job ID; returned only if there is a value.</dd></div>
<div class="mo-api-field"><dt><code>data.reruns[].node_key</code><span class="mo-api-field__type">string</span></dt><dd>Rerun starting point; only returned if there is a value.</dd></div>
<div class="mo-api-field"><dt><code>data.reruns[].mode</code><span class="mo-api-field__type">string</span></dt><dd>Rerun mode.</dd></div>
<div class="mo-api-field"><dt><code>data.reruns[].status</code><span class="mo-api-field__type">string</span></dt><dd>Branch status.</dd></div>
<div class="mo-api-field"><dt><code>data.reruns[].error</code><span class="mo-api-field__type">string</span></dt><dd>Branch error information; only returned when there is an error.</dd></div>
</dl>
```

:::
:::{div} mo-api-split-aside

```{raw} html
<p class="mo-api-example-label">Successful response example</p>
```

```json
{
  "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": "continue_from_node",
        "status": "running"
      }
    ]
  }
}
```

:::
::::

## Error response

::::{div} mo-api-split
:::{div} mo-api-split-main

```{raw} html
<dl class="mo-api-fields">
<div class="mo-api-field"><dt><code>code</code><span class="mo-api-field__type">string</span></dt><dd>Error code.</dd></div>
<div class="mo-api-field"><dt><code>msg</code><span class="mo-api-field__type">string</span></dt><dd>Readable error message.</dd></div>
<div class="mo-api-field"><dt><code>data</code><span class="mo-api-field__type">null</span></dt><dd>`null` in an error response.</dd></div>
</dl>
```

:::
:::{div} mo-api-split-aside

```{raw} html
<p class="mo-api-example-label">Error response example</p>
```

```json
{
  "code": "ErrNotFound",
  "msg": "资源不存在",
  "data": null
}
```

:::
::::

## Follow-up operations

Use `data.reruns[].rerun_id` [query workflow rerun details](get-workflow-rerun.md).
