Skip to main content
Deployment

触发 Deployment Run

手动触发一次 Deployment 执行。

前提

已完成 Endpoint 与鉴权配置,详见API 总览与认证

接口

POST /deployments/{deployment_id}/run

路径参数

参数必填类型说明
deployment_idstringDeployment ID

请求示例

curl -X POST "$AGENTSTUDIO_URL/deployments/depl_xxx/run" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"

响应

{
  "id": "drun_xxx",
  "type": "deployment_run",
  "deployment_id": "depl_xxx",
  "agent": {
    "id": "agent_xxx",
    "version": 13
  },
  "session_id": null,
  "trigger_source": "manual",
  "status": "running",
  "error": null,
  "started_at": "2026-07-28T02:00:00Z",
  "finished_at": null,
  "request_id": "req_xxx"
}

响应字段

字段类型说明
idstringDeployment Run ID
typestring固定值 deployment_run
deployment_idstring
agentobject
session_idstring | null异步 Session 创建完成前为 null
trigger_sourcestring
statusstring
errorobject | null错误信息,仅运行失败时返回
started_atstringISO 8601 时间戳
finished_atstring | null
request_idstring本次请求的唯一标识,排查问题时附带

错误码

状态码错误码说明
400InvalidParameterRequired parameter missing or invalid.
401InvalidApiKeyInvalid API-key provided.
409DEPLOYMENT_TRIGGER_CONFLICTConcurrent trigger conflict.