<span id="查询工作区自动化运行历史"></span>

# List workspace automation run history

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

Read automation run records scoped to the current workspace, not just the current user's runs or one task's runs.

```text
GET https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/agent-automation-runs
```

<span id="请求参数"></span>

## Request parameters

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Request example

```bash
curl --get "https://api.moi.matrixorigin.cn/v5/workspaces/$WORKSPACE_ID/agent-automation-runs" \
  -H "X-API-Key: $AI_STUDIO_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  --data-urlencode "limit=50" --data-urlencode "offset=0"
```

:::::
:::::{tab-item} Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `X-API-Key` | string | Yes | Valid personal access token for this environment; workspace access conditions also apply. |
| `X-Workspace-ID` | string | Yes | Must match workspace_id in the path. |
| `workspace_id` | string | Yes | Workspace ID; do not mix identifiers across environments. |
| `status` | string | No | One of eight run states. Omit to skip the status filter. |
| `created_from` | string | No | RFC 3339 timestamp; inclusive start. |
| `created_to` | string | No | RFC 3339 timestamp; exclusive end. |
| `limit` | integer | No | Defaults to 50, maximum 200. Continue pagination with the returned limit. |
| `offset` | integer | No | Defaults to 0; negative values become 0. |

:::::
::::::
:::::::

<span id="返回结果"></span>

## Result

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{
  "code": 0,
  "data": {
    "items": [
      {
        "id": "run-example",
        "workspace_id": "workspace-example",
        "automation_task_id": "task-example",
        "automation_task_version": 1,
        "trigger_type": "manual",
        "trigger_config_snapshot": {
          "mode": "cron",
          "cron_expression": "TZ=UTC 0 9 * * *"
        },
        "status": "queued",
        "created_at": "2026-11-11T01:00:00Z",
        "updated_at": "2026-11-11T01:00:00Z"
      }
    ],
    "total": 1,
    "limit": 50,
    "offset": 0
  }
}
```

:::::
:::::{tab-item} Fields

| Field | Type | Description |
| --- | --- | --- |
| `code` | integer | 0 on success. |
| `data.items` | object[] | Run records on this page; [] when empty. See [Run objects](run-objects.md) for fields. |
| `data.total` | integer | Total records matching current filters, not the page count. |
| `data.limit` | integer | Effective page size for this request. |
| `data.offset` | integer | Effective offset for this request. |

:::::
::::::
:::::::

<span id="查询范围与分页"></span>

## Query scope and pagination

Sorted by created_at descending, then id ascending. Request the next page using returned offset+limit and stop at total or an empty page. Concurrent additions or state changes may cause duplicates or omissions; this is not a snapshot cursor. Run IDs identify details/events/results; automation_task_id identifies the task definition.

This API does not read automation_task_id, task_id, agent_id, trigger_type, or mowl_case_id query parameters. Do not rely on them as filters. For task-scoped queries, use [Task run history](list-task-runs.md).

See [Query rules](query-rules.md) for parameter normalization and time boundaries, and [Errors and environments](errors-environments.md) for errors and authentication layers. SDK/CLI offer generic resource calls; absence of a dedicated list method does not make the feature unavailable.
