Archive a vault and its child credentials. This endpoint is a Bailian extension.
Endpoint
POST /vaults/{vault_id}/archive
Paths are relative to the Base URL. Send Authorization: Bearer $DASHSCOPE_API_KEY on every request. For authentication details, see Authentication.
Path parametersvault_idstring (required)Vault ID. Treat it as an opaque IDThe request has no body. | Request example |
Response fields200, returns the archived vault:id stringVault IDobject stringVault object type, fixed as vaultcreated_at integerCreation time in Unix secondsname string / nullDisplay namemetadata objectMetadata, string key-value pairs; {} when not setThe response keeps the vault structure and does not return archived_at or status. Archiving a vault also archives its child credentials. Archived resources can still be retrieved, and the default list includes both active and archived. There is no restore endpoint. | Response example |
Error codes
For the error response structure, see Errors.
| HTTP status | Error type / code | Solution |
|---|---|---|
401 | authentication_error / invalid_api_key | Send a valid Authorization: Bearer $DASHSCOPE_API_KEY header |
404 | not_found_error / not_found_error | The vault does not exist, is deleted, or belongs to another workspace |
500 | server_error / server_error | Retry later. If it keeps failing, submit a ticket with x-request-id |