Skip to main content

Archive Deployment

Archives a specified Deployment. The operation is idempotent. An archived Deployment cannot be updated, paused, or unpaused.

Prerequisites

Endpoint and authentication configured. For details, see Overview and authentication.

Endpoint

POST /deployments/{deployment_id}/archive

Path parameters

FieldRequiredTypeDescription
deployment_idYesstringDeployment ID

Request example

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

Response example

{
  "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"
}

Response fields

FieldTypeDescription
idstringDeployment ID
typestringAlways deployment
namestringDeployment name
descriptionstringDeployment description
agentobjectAssociated Agent; contains id and version
environment_idstringAssociated Environment ID
scheduleobjectSchedule trigger configuration
initial_eventsarray<object>Initial events sent to the Agent on trigger
resourcesarray<object>Mounted file resources
vault_idsarray<string>Associated Vault ID list
metadataobjectCustom key-value pairs
statusstringDeployment status: active or paused
paused_reasonstring | nullPause reason
archived_atstringArchive timestamp, ISO 8601
created_atstringCreation time, ISO 8601
updated_atstringLast update time, ISO 8601
request_idstringUnique request identifier

Error codes

HTTP statusError codeDescription
400InvalidParameterRequired parameter missing or invalid
401InvalidApiKeyInvalid API key provided
Flow Agent API
Sandbox API
RAG API
Long-term Memory
ParseX API
Security API
Framework Integration