List vaults in the workspace with pagination and filters for metadata and archive status.
Endpoint
GET /vaults
Paths are relative to the Base URL. Send Authorization: Bearer $DASHSCOPE_API_KEY on every request. For authentication details, see Authentication.
Query parameterslimitinteger (optional)Page size. Default 20, range 1–100. An empty string, 0, a negative number, a non-number, or an out-of-range value returns 400order string (optional)Sort direction, asc or desc. Default descafter string (optional)The last_id from the previous page. Starts after that item and excludes itmetadata[key] string (optional)Metadata filter, exact metadata match. Multiple conditions are combined with ANDstatus string (optional)Vault status: active or archived. Both are included by default. Repeated status[] parameters are also supported, and their values are merged into one filter setbefore is not a supported parameter. | Request example |
Response fields200, returns a list envelope:object stringList object type, fixed as listdata arrayVaults on the current pagefirst_id string / nullID of the first item on the page; null for an empty pagelast_id string / nullID of the last item on the page; use it as after for the next page. null for an empty pagehas_more booleanWhether more matching resources existVault fieldsidstringVault IDobject stringVault object type, fixed as vaultcreated_at integerCreation time in Unix secondsname string / nullDisplay namemetadata objectMetadata, string key-value pairs; {} when not setAn empty page returns data: [], with first_id and last_id set to null and has_more set to false. | Response example |
Error codes
For the error response structure, see Errors.
| HTTP status | Error type / code | Solution |
|---|---|---|
400 | invalid_request_error / invalid_request_error | limit, order, or a metadata filter is invalid |
401 | authentication_error / invalid_api_key | Send a valid Authorization: Bearer $DASHSCOPE_API_KEY header |
404 | not_found_error / not_found_error | The after cursor 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 |