Skip to main content
Deployment

归档 Deployment

归档指定 Deployment,操作幂等。

前提

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

接口

POST /deployments/{deployment_id}/archive

路径参数

参数必填类型说明
deployment_idstringDeployment ID

请求示例

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

响应

{
  "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": "2026-07-28T03:00:00Z",
  "created_at": "2026-07-20T10:00:00Z",
  "updated_at": "2026-07-28T03:00:00Z",
  "request_id": "req_xxx"
}

响应字段

字段类型说明
idstringDeployment ID
typestring固定值 deployment
namestringDeployment 名称
descriptionstringDeployment 描述
agentobject
environment_idstring
scheduleobject定时触发配置
initial_eventsarray<object>
resourcesarray<object>
vault_idsarray<string>
metadataobject
statusstring
paused_reasonstring | null
archived_atstring | null
created_atstring
updated_atstring
request_idstring本次请求的唯一标识,排查问题时附带

错误码

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