读取部署运行
GET
/agent/v1/deployment_runs/{deployment_run_id}● 支持请求参数
deployment_run_idstring必填path: 部署运行 ID(drun_...),由 deployments.run 或 deployment_runs.list 返回。
返回
200
支持手动运行与 cron 调度,使用固定智能体版本创建会话;创建失败记录错误并自动暂停,恢复后继续调度。错过多个时间点只补跑一次。运行列表支持部署、错误、触发类型、时间范围过滤及游标翻页。
错误按 Anthropic 错误格式返回(type / message / request_id),参见 错误码
请求示例
curl
curl https://api.deepraxis.com/agent/v1/deployment_runs/drun_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/drun_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/drun_123`, {
headers: { Authorization: `Bearer ${opts.apiKey}` },
});
console.log(resp.status, await resp.json());响应示例 200
{
"id": "drun_88fc2bb3f354482b8c3f04c7ccaabbac",
"type": "deployment_run",
"agent": {
"type": "agent",
"id": "agent_ad7016f6-21c7-43b3-a538-6605e0160ba2",
"version": 1
},
"created_at": "2026-10-22T15:26:25.382Z",
"deployment_id": "depl_3997c0158bdb41c09fdba6f44905cc82",
"session_id": "sesn_7860b1a7a2284c5489b7eb24b1233f7e",
"error": null,
"trigger_context": {
"type": "manual"
}
}响应
HTTP 200
Successful response
application/json
| 名称 | 类型 | 说明 |
|---|---|---|
| id | string | Unique identifier for this run (drun_...). |
| agent | object | A resolved agent reference with a concrete version. |
| agent.id | string | Agent id (agent_...). Pass it as agent when creating a session and as agent_id in agent calls. |
| agent.type | string | Always agent. A roster member that refers to an agent by id and pinned version. |
| agent.version | number | The latest saved version of the agent, the editable head; it differs from active_version after a save with apply false. Starts at 1 and increments each time the agent is modified. |
| created_at | string | A timestamp in RFC 3339 format |
| deployment_id | string | ID of the deployment that produced this run. |
| error | null | object | Why the run failed to create a session. The type identifies the failure; message is human-readable detail. |
| error.message | string | Human-readable error description. |
| error.type | string | Always environment_archived_error. The selected environment was archived. / Always agent_archived_error. The referenced agent was archived. / Always environment_not_found_error. The selected environment could not be found. / Always vault_not_found_error. A referenced credential vault could not be found. / Always vault_archived_error. A referenced credential vault was archived. / Always file_not_found_error. A referenced file could not be found. / Always memory_store_archived_error. A referenced memory store was archived. / Always skill_not_found_error. A referenced skill could not be found. / Always session_resource_not_found_error. A referenced session resource could not be found. / Always workspace_archived_error. The deployment workspace was archived. / Always organization_disabled_error. The owning organization was disabled. / Always session_rate_limited_error. Session creation exceeded the rate limit. / Always session_creation_rejected_error. Session creation was rejected because its parameters were invalid. / Always unknown_error. An unclassified server error. / Always self_hosted_resources_unsupported_error. The selected self-hosted environment does not support these resources. / Always mcp_egress_blocked_error. The environment network policy blocks a configured MCP server. |
| session_id | null | string | Populated on success. Null on creation failure. Exactly one of session_id or error is non-null. |
| trigger_context | object | Describes what triggered a deployment run, with trigger-specific metadata. |
| trigger_context.scheduled_at | string | A timestamp in RFC 3339 format |
| trigger_context.type | string | Always schedule. The cron schedule triggered this run at scheduled_at. / Always manual. An explicit request triggered this run or paused this deployment. |
| type | string | Always deployment_run. The result of one manual or scheduled deployment trigger. |
运行示例前
先创建部署,用返回的 ID 替换 depl_123。部署运行 ID drun_123 取自运行部署的响应。取消暂停前先暂停部署;测试结束后等待生成的会话空闲并删除会话,再归档部署、环境和智能体。