# View workflow jobs

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

Lists the workflow execution jobs that are readable by the current caller. First find the execution ID through this interface, and then query the job details or results.

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

## Preparation before calling

Prepare a personal access token and target workspace ID that has access to the target workspace.

## Query parameters

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

```{raw} html
<dl class="mo-api-fields">
  <div class="mo-api-field"><dt><code>offset</code><span class="mo-api-field__type">integer</span></dt><dd>Returns the starting position of the list.</dd></div>
  <div class="mo-api-field"><dt><code>limit</code><span class="mo-api-field__type">integer</span></dt><dd>Return the quantity.</dd></div>
  <div class="mo-api-field"><dt><code>status</code><span class="mo-api-field__type">string</span></dt><dd>Filter by job status.</dd></div>
  <div class="mo-api-field"><dt><code>execution_mode</code><span class="mo-api-field__type">string</span></dt><dd>Filter by execution mode.</dd></div>
  <div class="mo-api-field"><dt><code>workflow_name</code><span class="mo-api-field__type">string</span></dt><dd>Filter by workflow name.</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/executions?offset=0&limit=20" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"
```

:::
::::

## Successful response

Returns `200` on success. `data.total` is the total number of matches, and `data.executions` is the job summary for the current page.

::::{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.total</code><span class="mo-api-field__type">integer</span></dt><dd>The total number of jobs that meet the filter conditions.</dd></div>
  <div class="mo-api-field"><dt><code>data.executions</code><span class="mo-api-field__type">object[]</span></dt><dd>Current page job summary; empty array when there are no results.</dd></div>
  <div class="mo-api-field"><dt><code>data.executions[].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.executions[].workflow_id</code><span class="mo-api-field__type">string</span></dt><dd>ID of the workflow to which it belongs.</dd></div>
  <div class="mo-api-field"><dt><code>data.executions[].dispatch_job_id</code><span class="mo-api-field__type">string</span></dt><dd>Scheduling job ID; returned when provided by the server.</dd></div>
  <div class="mo-api-field"><dt><code>data.executions[].workflow_name</code><span class="mo-api-field__type">string</span></dt><dd>Workflow name; returned when provided by the server.</dd></div>
  <div class="mo-api-field"><dt><code>data.executions[].status</code><span class="mo-api-field__type">string</span></dt><dd>Current status.</dd></div>
  <div class="mo-api-field"><dt><code>data.executions[].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.executions[].available_actions</code><span class="mo-api-field__type">string[]</span></dt><dd>Operations allowed in the current state.</dd></div>
  <div class="mo-api-field"><dt><code>data.executions[].cron_expression</code><span class="mo-api-field__type">string</span></dt><dd>Cron expression; only returned in timing mode.</dd></div>
  <div class="mo-api-field"><dt><code>data.executions[].moi_task_id</code><span class="mo-api-field__type">string</span></dt><dd>Task ID; returned when the server has assigned it.</dd></div>
  <div class="mo-api-field"><dt><code>data.executions[].moi_case_id</code><span class="mo-api-field__type">string</span></dt><dd>Case ID; returned when the server has assigned it.</dd></div>
  <div class="mo-api-field"><dt><code>data.executions[].moi_workflow_def_id</code><span class="mo-api-field__type">string</span></dt><dd>Workflow definition identifier; returned when the server has assigned it.</dd></div>
  <div class="mo-api-field"><dt><code>data.executions[].moi_workflow_version_id</code><span class="mo-api-field__type">string</span></dt><dd>Workflow version identifier; returned when the server has assigned it.</dd></div>
  <div class="mo-api-field"><dt><code>data.executions[].data_name</code><span class="mo-api-field__type">string</span></dt><dd>The name of the data associated with this execution; returned when applicable.</dd></div>
  <div class="mo-api-field"><dt><code>data.executions[].file_id</code><span class="mo-api-field__type">string</span></dt><dd>The file ID associated with this execution; returned when applicable.</dd></div>
  <div class="mo-api-field"><dt><code>data.executions[].pause_scope</code><span class="mo-api-field__type">string</span></dt><dd>Pause range; returned when in pause state and provided by the server.</dd></div>
  <div class="mo-api-field"><dt><code>data.executions[].error</code><span class="mo-api-field__type">string</span></dt><dd>Current execution error; returned when there is an error.</dd></div>
  <div class="mo-api-field"><dt><code>data.executions[].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.executions[].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.executions[].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.executions[].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": {
    "total": 1,
    "executions": [
      {
        "execution_id": "exec-001",
        "dispatch_job_id": "dispatch-001",
        "workflow_id": "wf-001",
        "workflow_name": "daily-import",
        "status": "running",
        "available_actions": ["pause", "cancel"],
        "execution_mode": "one_shot",
        "moi_task_id": "task-001",
        "moi_case_id": "case-001",
        "started_at": "2026-08-18T10:00:00Z",
        "created_at": "2026-08-18T10:00:00Z",
        "updated_at": "2026-08-18T10:01: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": "ErrParamInvalid",
  "msg": "请求参数无效",
  "data": null
}
```

:::
::::

## Follow-up operations

Use `data.executions[].workflow_id` and `execution_id` [query workflow job details](get-workflow-job.md).
