跳转到主要内容
GET /v1/deployment_runs 跨所有 Deployment 列出当前用户的运行记录。此顶级端点适用于监控所有执行活动,无需按特定 Deployment 筛选。

请求头

头部必选说明
AuthorizationBearer <PAT>

查询参数

参数类型必选说明
limitinteger每页最大记录数,默认 20,最大 1000
after_idstring游标分页:返回此 ID 之后的记录
before_idstring游标分页:返回此 ID 之前的记录
deployment_idstring按 Deployment ID 筛选
statusstring按运行状态筛选:pendingrunningcompletedfailedskipped
trigger_typestring按触发类型筛选:manualscheduleretry
has_errorboolean筛选有/无错误的运行

示例请求

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

示例响应

HTTP 200 OK
{
  "data": [
    {
      "agent": {
        "id": "agent_019ebb21ef8e7df6a559052c94875160",
        "type": "agent",
        "version": 1
      },
      "cas_run_extras": {
        "attempt": 1,
        "started_at": "2026-06-14T08:58:17.165588Z",
        "turn_id": "turn_019ec55a68b87a9dafad75c1554d1102"
      },
      "completed_at": "2026-06-14T08:58:34.433744Z",
      "created_at": "2026-06-14T08:58:17.13334Z",
      "deployment_id": "dep_019ec55a2b687b3f94eee77dd77e4b2a",
      "duration_ms": 17268,
      "error": null,
      "id": "drun_019ec55a68af73028afa5b87931cb2f3",
      "session_id": "sess_019ec55a68b37e1e8d660691af161ab4",
      "status": "completed",
      "trigger_context": {
        "type": "manual"
      },
      "triggered_at": "2026-06-14T08:58:17.13334Z",
      "type": "deployment_run"
    },
    {
      "agent": {
        "id": "agent_019ebb21ef8e7df6a559052c94875160",
        "type": "agent",
        "version": 1
      },
      "cas_run_extras": {
        "attempt": 1,
        "started_at": "2026-06-14T08:58:04.451126Z",
        "turn_id": "turn_019ec55a371778e78e5ebf118fb1821d"
      },
      "completed_at": "2026-06-14T08:58:19.973358Z",
      "created_at": "2026-06-14T08:58:04.43405Z",
      "deployment_id": "dep_019ec53748f7784bac33f208c0f66982",
      "duration_ms": 15522,
      "error": null,
      "id": "drun_019ec55a371470969dd48ce41fb2a7da",
      "session_id": "sess_019ec55a37157b049f3e7f3681b5ec15",
      "status": "completed",
      "trigger_context": {
        "type": "schedule"
      },
      "triggered_at": "2026-06-14T08:58:04.43405Z",
      "type": "deployment_run"
    }
  ],
  "first_id": "drun_019ec55a68af73028afa5b87931cb2f3",
  "has_more": true,
  "last_id": "drun_019ec55a371470969dd48ce41fb2a7da",
  "next_page": "drun_019ec55a371470969dd48ce41fb2a7da"
}

响应字段

字段类型说明
dataarrayDeployment Run 对象列表
first_idstring当前页第一条记录的 ID
last_idstring当前页最后一条记录的 ID
has_moreboolean是否还有更多记录
next_pagestring 或 null下一页游标值(无更多时为 null)
Run 对象字段说明详见 手动触发 Deployment

错误码

HTTPtype触发条件
401authentication_errorPAT 无效或过期
完整错误信封说明详见 错误参考

相关

获取 Deployment Run(全局)

根据 Run ID 直接获取运行详情。

列出 Deployment Run

按 Deployment 查询运行历史。

列出 Deployment

查看账号下的所有 Deployment。

手动触发 Deployment

立即触发一次 Deployment 运行。