手动触发一次 Deployment 运行。
路径参数
|
参数 |
类型 |
说明 |
|
|
string |
Deployment ID( |
请求头
|
头部 |
必选 |
说明 |
|
|
是 |
|
|
|
是 |
|
请求体
无需请求体。可发送空 JSON {} 或省略。
示例请求
curl -X POST "https://api.qoder.com.cn/api/v1/cloud/deployments/dep_019ec55a2b687b3f94eee77dd77e4b2a/run" \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json"
示例响应
HTTP 200 OK
返回 Deployment Run 对象。
{
"agent": {
"id": "agent_019ebb21ef8e7df6a559052c94875160",
"type": "agent",
"version": 1
},
"cas_run_extras": {
"attempt": 1,
"started_at": "2026-06-14T08:58:17.165588936Z",
"turn_id": "turn_019ec55a68b87a9dafad75c1554d1102"
},
"created_at": "2026-06-14T08:58:17.133340942Z",
"deployment_id": "dep_019ec55a2b687b3f94eee77dd77e4b2a",
"error": null,
"id": "drun_019ec55a68af73028afa5b87931cb2f3",
"session_id": "sess_019ec55a68b37e1e8d660691af161ab4",
"status": "running",
"trigger_context": {
"type": "manual"
},
"triggered_at": "2026-06-14T08:58:17.133340942Z",
"type": "deployment_run"
}
响应字段(Deployment Run)
|
字段 |
类型 |
说明 |
|
|
string |
Run 唯一标识( |
|
|
string |
固定值 |
|
|
string |
所属 Deployment ID |
|
|
object |
Agent 引用: |
|
|
string |
运行状态: |
|
|
object 或 null |
失败时的错误详情( |
|
|
object |
触发来源: |
|
|
string |
关联的 Session ID(session 创建后出现) |
|
|
string |
完成时间(ISO 8601,终态时出现) |
|
|
integer |
运行时长(毫秒,completed 时出现) |
|
|
object |
CAS 特有元数据: |
|
|
string |
触发时间(ISO 8601) |
|
|
string |
记录创建时间(ISO 8601) |
错误码
|
HTTP |
type |
触发条件 |
|
401 |
|
PAT 无效或过期 |
|
404 |
|
Deployment 不存在 |
|
409 |
|
Deployment 已归档或不在 |
完整错误信封说明详见错误参考。