> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 列出所有 Deployment Runs

> 跨 Deployment 列出运行记录。

`GET /api/v1/cloud/deployment_runs`

跨所有 Deployment 列出当前用户的运行记录。此顶级端点适用于监控所有执行活动，无需按特定 Deployment 筛选。

## 请求头

| 头部              | 必选 | 说明             |
| --------------- | -- | -------------- |
| `Authorization` | 是  | `Bearer <PAT>` |

## 查询参数

| 参数                | 类型      | 必选 | 说明                                                           |
| ----------------- | ------- | -- | ------------------------------------------------------------ |
| `limit`           | integer | 否  | 每页最大记录数，默认 20，范围 1-100。超过 100 返回 `400 invalid_request_error` |
| `page`            | string  | 否  | `next_page` 返回的游标值。不能与 `before_id` 或 `after_id` 同时使用         |
| `after_id`        | string  | 否  | 游标分页：返回此 ID 之后的记录                                            |
| `before_id`       | string  | 否  | 游标分页：返回此 ID 之前的记录                                            |
| `deployment_id`   | string  | 否  | 按 Deployment ID 筛选                                           |
| `trigger_type`    | string  | 否  | 按触发类型筛选：`manual`、`schedule`                                  |
| `has_error`       | boolean | 否  | 筛选有/无公开 `error` 对象的运行                                        |
| `created_at[gt]`  | string  | 否  | 仅返回创建时间晚于该时间的 Run（ISO 8601）                                  |
| `created_at[gte]` | string  | 否  | 仅返回创建时间大于等于该时间的 Run（ISO 8601）                                |
| `created_at[lt]`  | string  | 否  | 仅返回创建时间早于该时间的 Run（ISO 8601）                                  |
| `created_at[lte]` | string  | 否  | 仅返回创建时间小于等于该时间的 Run（ISO 8601）                                |

## 示例请求

```bash theme={null}
curl -X GET "https://api.qoder.com/api/v1/cloud/deployment_runs?limit=2" \
  -H "Authorization: Bearer $QODER_PAT"
```

## 示例响应

**HTTP 200 OK**

```json theme={null}
{
  "data": [
    {
      "agent": {
        "id": "agent_019ebb21ef8e7df6a559052c94875160",
        "type": "agent",
        "version": 1
      },
      "created_at": "2026-06-14T08:58:17Z",
      "deployment_id": "dep_019ec55a2b687b3f94eee77dd77e4b2a",
      "error": null,
      "id": "drun_019ec55a68af73028afa5b87931cb2f3",
      "session_id": "sess_019ec55a68b37e1e8d660691af161ab4",
      "trigger_context": {
        "type": "manual"
      },
      "type": "deployment_run"
    },
    {
      "agent": {
        "id": "agent_019ebb21ef8e7df6a559052c94875160",
        "type": "agent",
        "version": 1
      },
      "created_at": "2026-06-14T08:58:04Z",
      "deployment_id": "dep_019ec53748f7784bac33f208c0f66982",
      "error": null,
      "id": "drun_019ec55a371470969dd48ce41fb2a7da",
      "session_id": "sess_019ec55a37157b049f3e7f3681b5ec15",
      "trigger_context": {
        "scheduled_at": "2026-06-14T08:58:04Z",
        "type": "schedule"
      },
      "type": "deployment_run"
    }
  ],
  "first_id": "drun_019ec55a68af73028afa5b87931cb2f3",
  "has_more": true,
  "last_id": "drun_019ec55a371470969dd48ce41fb2a7da",
  "next_page": "drun_019ec55a371470969dd48ce41fb2a7da"
}
```

## 响应字段

| 字段          | 类型            | 说明                  |
| ----------- | ------------- | ------------------- |
| `data`      | array         | Deployment Run 对象列表 |
| `first_id`  | string        | 当前页第一条记录的 ID        |
| `last_id`   | string        | 当前页最后一条记录的 ID       |
| `has_more`  | boolean       | 是否还有更多记录            |
| `next_page` | string 或 null | 下一页游标值（无更多时为 null）  |

使用 `next_page` 作为下次请求的 `page` 参数向前翻页。

Run 对象字段说明详见 [手动触发 Deployment](/zh/cloud-agents/api/deployments/run)。

## 错误码

| HTTP | type                   | 触发条件      |
| ---- | ---------------------- | --------- |
| 401  | `authentication_error` | PAT 无效或过期 |

完整错误信封说明详见 [错误参考](/zh/cloud-agents/api/conventions/errors)。

## 相关

<CardGroup cols={2}>
  <Card title="获取 Deployment Run（全局）" icon="code" href="/zh/cloud-agents/api/deployments/get-run-global">
    根据 Run ID 直接获取运行详情。
  </Card>

  <Card title="列出 Deployment Run" icon="clock" href="/zh/cloud-agents/api/deployments/list-runs">
    按 Deployment 查询运行历史。
  </Card>

  <Card title="列出 Deployment" icon="list" href="/zh/cloud-agents/api/deployments/list">
    查看账号下的所有 Deployment。
  </Card>

  <Card title="手动触发 Deployment" icon="play" href="/zh/cloud-agents/api/deployments/run">
    立即触发一次 Deployment 运行。
  </Card>
</CardGroup>
