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

> 根据 ID 获取单个 Deployment Run。

`GET /api/v1/cloud/deployments/{id}/runs/{run_id}`

根据 ID 获取指定 Deployment 下的单个运行记录。

## 路径参数

| 参数       | 类型     | 说明                       |
| -------- | ------ | ------------------------ |
| `id`     | string | Deployment ID（`dep_` 前缀） |
| `run_id` | string | Run ID（`drun_` 前缀）       |

## 请求头

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

## 示例请求

```bash theme={null}
curl -X GET "https://api.qoder.com/api/v1/cloud/deployments/dep_019ec55a2b687b3f94eee77dd77e4b2a/runs/drun_019ec55a68af73028afa5b87931cb2f3" \
  -H "Authorization: Bearer $QODER_PAT"
```

## 示例响应

**HTTP 200 OK**

返回单个 Deployment Run 对象。

```json theme={null}
{
  "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"
}
```

## 错误码

| HTTP | type                   | 触发条件                 |
| ---- | ---------------------- | -------------------- |
| 401  | `authentication_error` | PAT 无效或过期            |
| 404  | `not_found_error`      | Deployment 或 Run 不存在 |

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

## 相关

<CardGroup cols={2}>
  <Card title="列出 Deployment Run" icon="list" href="/zh/cloud-agents/api/deployments/list-runs">
    查看该 Deployment 的运行历史。
  </Card>

  <Card title="获取 Deployment Run（全局）" icon="layer-group" href="/zh/cloud-agents/api/deployments/get-run-global">
    无需指定父 Deployment 即可获取 Run。
  </Card>

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

  <Card title="获取 Deployment" icon="rocket" href="/zh/cloud-agents/api/deployments/get">
    查看 Deployment 配置与状态。
  </Card>
</CardGroup>
