列出部署运行
/agent/v1/deployment_runs● 支持请求参数
created_at[gt]string可选query: Return runs created strictly after this time (exclusive).
created_at[gte]string可选query: Return runs created at or after this time (inclusive).
created_at[lt]string可选query: Return runs created strictly before this time (exclusive).
created_at[lte]string可选query: Return runs created at or before this time (inclusive).
deployment_idstring可选query: 按指定部署筛选。省略则列出工作区全部部署的运行。不存在的 deployment_id 返回 200,data 为空。
has_errorboolean可选query: 筛选:true 返回 error 非 null 的运行,false 返回 session_id 非 null 的运行。省略返回全部。
trigger_typestring可选query: Filter runs by what triggered them. Omit to return all runs.
limitnumber可选query: Number of items per page.
pagestring可选query: 不透明分页游标:原样传入上一响应的 next_page 值。第一页省略。来自不同查询或格式错误的游标返回 400。
返回
200
支持手动运行与 cron 调度,使用固定智能体版本创建会话;创建失败记录错误并自动暂停,恢复后继续调度。错过多个时间点只补跑一次。运行列表支持部署、错误、触发类型、时间范围过滤及游标翻页。
错误按 Anthropic 错误格式返回(type / message / request_id),参见 错误码
请求示例
curl
curl "https://api.deepraxis.com/agent/v1/deployment_runs?deployment_id=depl_123" \
-H "Authorization: Bearer $PRAXIS_API_KEY"Python
import requests
opts = dict(
base_url="https://api.deepraxis.com/agent",
api_key="$PRAXIS_API_KEY",
)
# /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
resp = requests.get(
f"{opts['base_url']}/v1/deployment_runs?deployment_id=depl_123",
headers={"Authorization": f"Bearer {opts['api_key']}"},
)
print(resp.status_code, resp.json())TypeScript
const opts = {
baseURL: "https://api.deepraxis.com/agent",
apiKey: "$PRAXIS_API_KEY",
};
// /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/v1/deployment_runs?deployment_id=depl_123`, {
headers: { Authorization: `Bearer ${opts.apiKey}` },
});
console.log(resp.status, await resp.json());响应示例 200
{
"data": [
{
"id": "drun_8e34a8431c80444493b32b1ad49cd2bd",
"type": "deployment_run",
"agent": {
"type": "agent",
"id": "agent_18b8d51c-3dfb-4b8a-82d7-14f254114b35",
"version": 1
},
"created_at": "2026-10-22T15:26:05.412Z",
"deployment_id": "depl_4796b85839d54ec485fad1947c9d0ed4",
"session_id": "sesn_bf060568e1aa48bca4098f84b3e3ec2f",
"error": null,
"trigger_context": {
"type": "manual"
}
}
],
"next_page": null
}响应
HTTP 200
Successful response
application/json
| 名称 | 类型 | 说明 |
|---|---|---|
| data | array<object> | Items of this page, in the order requested by the call. |
| data[].id | string | Unique identifier for this run (drun_...). |
| data[].agent | object | A resolved agent reference with a concrete version. |
| data[].created_at | string | A timestamp in RFC 3339 format |
| data[].deployment_id | string | ID of the deployment that produced this run. |
| data[].error | null | object | Why the run failed to create a session. The type identifies the failure; message is human-readable detail. |
| data[].session_id | null | string | Populated on success. Null on creation failure. Exactly one of session_id or error is non-null. |
| data[].trigger_context | object | Describes what triggered a deployment run, with trigger-specific metadata. |
| data[].type | string | Always deployment_run. The result of one manual or scheduled deployment trigger. |
| next_page | string | null | Opaque cursor for the next page: pass it unchanged as page to continue. Null when this is the last page. |
运行示例前
先创建部署,用返回的 ID 替换 depl_123。部署运行 ID drun_123 取自运行部署的响应。取消暂停前先暂停部署;测试结束后等待生成的会话空闲并删除会话,再归档部署、环境和智能体。