# View workflow rerun details

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

Read the status of a workflow rerun branch.

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

## Preparation before calling

First [query the workflow rerun list](list-workflow-reruns.md) to obtain the rerun 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>
<div class="mo-api-field"><dt><code>rerun_id</code><span class="mo-api-field__type">string</span></dt><dd>Rerun 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/reruns/$RERUN_ID" \
  -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.rerun.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.rerun.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.rerun.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.rerun.source_branch_id</code><span class="mo-api-field__type">string</span></dt><dd>Source branch ID; only returned if there is a value.</dd></div>
<div class="mo-api-field"><dt><code>data.rerun.new_workflow_execution_id</code><span class="mo-api-field__type">string</span></dt><dd>New job ID; returned only if there is a value.</dd></div>
<div class="mo-api-field"><dt><code>data.rerun.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.rerun.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.rerun.mode</code><span class="mo-api-field__type">string</span></dt><dd>Rerun mode.</dd></div>
<div class="mo-api-field"><dt><code>data.rerun.status</code><span class="mo-api-field__type">string</span></dt><dd>Current branch status.</dd></div>
<div class="mo-api-field"><dt><code>data.rerun.error</code><span class="mo-api-field__type">string</span></dt><dd>Branch error information; only returned when there is an error.</dd></div>
<div class="mo-api-field"><dt><code>data.start_error</code><span class="mo-api-field__type">string</span></dt><dd>Start error; only returned if there is a value.</dd></div>
<div class="mo-api-field"><dt><code>data.refresh_error</code><span class="mo-api-field__type">string</span></dt><dd>Refresh error; only returned if there is a value.</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": {
    "rerun": {
      "rerun_id": "rerun-001",
      "branch_id": "branch-001",
      "case_id": "case-001",
      "source_branch_id": "branch-000",
      "new_workflow_execution_id": "exec-002",
      "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

When you need to stop the branch [cancel the workflow and rerun](cancel-workflow-rerun.md).
