Skip to main content

List Credentials

Paginated list of all Credentials under a specified Vault.

Prerequisites

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

Endpoint

GET /vaults/{vault_id}/credentials

Path parameters

vault_id string (必选) Vault ID, format vlt_xxx

Query parameters

include_archived boolean (可选)Whether to include archived Credentials; default falselimit integer (可选)Number of items per page; default 20, max 100page string (可选)Pagination cursor; take from the next_page value of the previous response

Request example

curl "$AGENTSTUDIO_URL/vaults/vlt_xxx/credentials?include_archived=true&limit=20" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"

Response fields

data array<object>Array of Credential objectsdata[].id stringCredential ID, format cred_xxxdata[].type stringAlways credentialdata[].vault_id stringVault ID that the Credential belongs todata[].display_name stringHuman-readable name of the Credentialdata[].auth objectAuthentication information with sensitive values maskeddata[].metadata objectCustom key-value pairsdata[].archived_at string | nullArchive timestamp; null if not archiveddata[].created_at stringCreation time, ISO 8601data[].updated_at stringLast update time, ISO 8601data[].request_id stringUnique request identifiernext_page string | nullNext page cursor; null when there is no more data

Response

The response contains data (an array of Credential objects) and next_page (the cursor for the next page, null when there is no more data).
{
  "data": [
    {
      "id": "cred_xxx",
      "type": "credential",
      "vault_id": "vlt_xxx",
      "display_name": "Third-party API key",
      "auth": {
        "type": "environment_variable",
        "secret_name": "API_KEY",
        "networking": {
          "allowed_hosts": [
            "api.example.com",
            "*.example.com"
          ]
        },
        "injection_location": {
          "header": true
        }
      },
      "metadata": {},
      "archived_at": null,
      "created_at": "2026-07-10T08:00:00Z",
      "updated_at": "2026-07-10T08:00:00Z",
      "request_id": "req_xxx"
    }
  ],
  "next_page": null
}

Error codes

HTTP statusError codeDescription
400InvalidParameterRequired parameter missing or invalid.
401InvalidApiKeyInvalid API-key provided.