# View workflow job details

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

Read the current execution information of the specified workflow job. HTTP success only means successful reading, and the job result should be judged based on the execution status in the response.

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

## Preparation before calling

First [query the workflow job list](list-workflow-jobs.md) to obtain the workflow ID and 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><span class="mo-api-field__required">Required</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><span class="mo-api-field__required">Required</span></dt><dd>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" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"
```

:::
::::

## Successful response

Returns `200` on success. Determine the current or final status of the job based on `data.execution.status`.

::::{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.execution.execution_id</code><span class="mo-api-field__type">string</span></dt><dd>Execution ID.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.workflow_id</code><span class="mo-api-field__type">string</span></dt><dd>Workflow ID.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.status</code><span class="mo-api-field__type">string</span></dt><dd>Current execution status.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.available_actions</code><span class="mo-api-field__type">string[]</span></dt><dd>Current executable operations.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.execution_mode</code><span class="mo-api-field__type">string</span></dt><dd>Execution mode.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.cron_expression</code><span class="mo-api-field__type">string</span></dt><dd>Cron expression; may be omitted if not configured.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.input_payload</code><span class="mo-api-field__type">object</span></dt><dd>The running input after the server is expanded.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.vars_payload</code><span class="mo-api-field__type">object</span></dt><dd>The running variable after the server is expanded.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.moi_task_id</code><span class="mo-api-field__type">string</span></dt><dd>Server task ID; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.moi_case_id</code><span class="mo-api-field__type">string</span></dt><dd>Server case identifier; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.moi_workflow_def_id</code><span class="mo-api-field__type">string</span></dt><dd>Workflow definition identifier; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.moi_workflow_version_id</code><span class="mo-api-field__type">string</span></dt><dd>Workflow version identifier; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.pause_scope</code><span class="mo-api-field__type">string</span></dt><dd>Pause range; returned when there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.error</code><span class="mo-api-field__type">string</span></dt><dd>Error message; returned if there is a value.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.started_at</code><span class="mo-api-field__type">string</span></dt><dd>Start time; may be omitted if not generated.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.ended_at</code><span class="mo-api-field__type">string</span></dt><dd>End time; may be omitted if not generated.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.created_at</code><span class="mo-api-field__type">string</span></dt><dd>Creation time; may be omitted if not generated.</dd></div>
  <div class="mo-api-field"><dt><code>data.execution.updated_at</code><span class="mo-api-field__type">string</span></dt><dd>Last updated time; may be omitted if not generated.</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": {
    "execution": {
      "execution_id": "exec-001",
      "workflow_id": "wf-001",
      "status": "running",
      "available_actions": ["pause", "cancel"],
      "execution_mode": "one_shot",
      "input_payload": {
        "source": "file-001"
      },
      "vars_payload": {},
      "moi_task_id": "task-001",
      "moi_case_id": "case-001",
      "started_at": "2026-08-18T10:00:00Z",
      "created_at": "2026-08-18T10:00:00Z"
    }
  }
}
```

:::
::::

## 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

You can [Refresh Workflow Job Status](refresh-workflow-job.md) while the job is still in progress. When output is needed [query workflow job results](get-workflow-job-result.md).
