将已暂停的 Deployment 恢复为活跃状态。
前提
已完成 Endpoint 与鉴权配置,详见API 总览与认证。
接口
POST
/deployments/{deployment_id}/unpause路径参数
deployment_idstring必填Deployment ID
请求示例
curl -X POST "$AGENTSTUDIO_URL/deployments/depl_xxx/unpause" \
-H "Authorization: Bearer $DASHSCOPE_API_KEY"
响应字段
idstringDeployment ID
typestring固定值 deployment
namestringDeployment 名称
descriptionstringDeployment 描述
agentobject关联的 Agent
environment_idstring关联的 Environment ID
scheduleobject定时触发配置
initial_eventsarray<object>触发时发送给 Agent 的初始事件列表,1-50 项
resourcesarray<object>挂载文件资源列表
vault_idsarray<string>关联的 Vault ID 列表
metadataobject业务自定义键值对
statusstring资源状态
paused_reasonstring | null暂停原因,仅暂停状态时返回
archived_atstring | null归档时间;未归档时为 null
created_atstring创建时间,ISO 8601
updated_atstring最近更新时间,ISO 8601
request_idstring本次请求的唯一标识,排查问题时附带
响应示例
{
"id": "depl_xxx",
"type": "deployment",
"name": "Daily Report Generator",
"description": "Generates daily sales reports",
"agent": {
"id": "agent_xxx",
"version": 13
},
"environment_id": "env_xxx",
"schedule": {
"cron": "0 9 * * *"
},
"initial_events": [],
"resources": [],
"vault_ids": [],
"metadata": {},
"status": "active",
"paused_reason": null,
"archived_at": null,
"created_at": "2026-07-20T10:00:00Z",
"updated_at": "2026-07-28T02:00:00Z",
"request_id": "req_xxx"
}
错误码
| 状态码 | 错误码 | 说明 |
|---|---|---|
| 400 | InvalidParameter | Required parameter missing or invalid. |
| 401 | InvalidApiKey | Invalid API-key provided. |
| 409 | DEPLOYMENT_STATE_CONFLICT | Cannot unpause an archived deployment. |
该文章对您有帮助吗?