List credentials under a vault with pagination and filters for metadata and archive status.
Endpoint
GET /vaults/{vault_id}/credentials
Paths are relative to the Base URL. Send Authorization: Bearer $DASHSCOPE_API_KEY on every request. For authentication details, see Authentication.
Request parameters
| Field | Required | Type | Description |
|---|---|---|---|
vault_id | Yes | string | Parent vault ID. Treat it as an opaque ID |
limit | No | integer | Page size. Default 20, range 1–100. An empty string, 0, a negative number, a non-number, or an out-of-range value returns 400 |
order | No | string | Sort direction, asc or desc. Default desc |
after | No | string | The last_id from the previous page. Starts after that item and excludes it |
metadata[key] | No | string | Metadata filter, exact metadata match. Multiple conditions are combined with AND |
status | No | string | Credential status: active or archived. Both are included by default. Repeated status[] parameters are also supported, and their values are merged into one filter set |
before is not a supported parameter. Credentials are only listed under the vault in the path, and the after cursor must belong to the same vault.
Request example
Response example
Response fields
200, returns a list envelope:
| Field | Type | Description |
|---|---|---|
object | string | List object type, fixed as list |
data | array | Credentials on the current page |
first_id | string / null | ID of the first item on the page; null for an empty page |
last_id | string / null | ID of the last item on the page; use it as after for the next page. null for an empty page |
has_more | boolean | Whether more matching resources exist |
Credential fields
| Field | Type | Description |
|---|---|---|
id | string | Credential ID |
object | string | Credential object type, fixed as vault.credential |
vault_id | string | Vault ID that owns the credential |
name | string | Display name |
created_at | integer | Creation time in Unix seconds |
updated_at | integer | Last update time in Unix seconds |
metadata | object | Metadata, string key-value pairs; {} when not set |
auth | object | Authentication settings. |
auth.type | string | Authentication type, fixed as environment_variable |
auth.secret_name | string | Environment variable name |
auth.networking | object | Target domain settings. |
auth.networking.type | string | Network access type, limited or unrestricted |
auth.networking.allowed_hosts | array | Allowed target domains or IPv4 addresses when limited |
secret_value, the key identifier, or injection_location. An empty page returns data: [], with first_id and last_id set to null and has_more set to false.
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 parent vault does not exist, or the after cursor does not exist, is deleted, or belongs to another parent vault |
500 | server_error / server_error | Retry later. If it keeps failing, submit a ticket with x-request-id |