Skip to main content
Deployment

暂停 Deployment

暂停指定 Deployment,停止定时触发。

前提

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

接口

POST /deployments/{deployment_id}/pause

路径参数

参数必填类型说明
deployment_idstringDeployment ID

请求示例

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

响应

{
  "id": "depl_xxx",
  "type": "deployment",
  "name": "每日订单汇总",
  "status": "paused",
  "agent": {
    "id": "agent_xxx",
    "version": 12
  },
  "environment_id": "env_xxx",
  "schedule": {
    "type": "cron",
    "expression": "0 9 * * 1-5",
    "timezone": "Asia/Shanghai",
    "last_run_at": null,
    "next_run_at": null
  },
  "initial_events": [
    {
      "type": "message",
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "汇总昨日订单数据"
        }
      ]
    }
  ],
  "resources": [],
  "vault_ids": [],
  "metadata": {},
  "paused_reason": {
    "type": "manual"
  },
  "archived_at": null,
  "created_at": "2026-07-28T01:00:00Z",
  "updated_at": "2026-07-28T01:00:00Z",
  "request_id": "req_xxx"
}

响应字段

字段类型说明
idstringDeployment ID
typestring固定为 deployment
namestringDeployment 名称
descriptionstringDeployment 用途说明
agentobject关联 Agent 在锁定版本的快照
environment_idstring关联 Environment ID
scheduleobject定时触发配置。暂停后 next_run_atnull
initial_eventsarray<object>触发时发送给 Agent 的初始事件
resourcesarray<object>挂载的文件资源
vault_idsarray<string>关联 Vault ID 列表
metadataobject业务自定义键值对
statusstring此操作后固定为 paused
paused_reasonobject暂停原因
archived_atstring | null归档时间,未归档时为 null
created_atstring创建时间,ISO 8601
updated_atstring最近更新时间,ISO 8601
request_idstring请求唯一标识

错误码

状态码错误码说明
400InvalidParameterRequired parameter missing or invalid.
401InvalidApiKeyInvalid API-key provided.
409DEPLOYMENT_STATE_CONFLICTCannot pause an archived deployment.