Skip to main content

Retrieve vault

Retrieve a vault's name, metadata, and creation time by ID.

Endpoint

GET /vaults/{vault_id} Paths are relative to the Base URL. Send Authorization: Bearer $DASHSCOPE_API_KEY on every request. For authentication details, see Authentication.

Path parameters

vault_id string (required)Vault ID. Treat it as an opaque ID

Request example

curl -sS "$BASE_URL/vaults/vlt_xxx" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Response fields

200, returns a 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 setAn archived vault can still be retrieved.

Response example

{
  "id": "vlt_xxx",
  "object": "vault",
  "created_at": 1793941200,
  "name": "production-secrets",
  "metadata": {"team": "support"}
}

Error codes

For the error response structure, see Errors.
HTTP statusError type / codeSolution
401authentication_error / invalid_api_keySend a valid Authorization: Bearer $DASHSCOPE_API_KEY header
404not_found_error / not_found_errorThe vault does not exist, is deleted, or belongs to another workspace
500server_error / server_errorRetry later. If it keeps failing, submit a ticket with x-request-id