Retrieves the details of a specified Credential. The response is a Credential object with sensitive values masked in the auth field.
Prerequisites
Endpoint and authentication configured. For details, see API overview and authentication.
Endpoint
GET /vaults/{vault_id}/credentials/{credential_id}
Path parametersvault_idstring (必选)Vault ID, format vlt_xxxcredential_id string (必选)Credential ID, format cred_xxx | Request example |
Response fieldsidstringCredential ID, format cred_xxxtype stringFixed as credentialvault_id stringVault ID that the Credential belongs todisplay_name stringHuman-readable name of the Credentialauth objectAuthentication information with sensitive values masked (e.g. secret_value is not returned)auth.type stringAuth type; currently only environment_variable is supportedauth.secret_name stringEnvironment variable nameauth.networking objectNetwork policyauth.networking.allowed_hosts arrayList of domains allowed for real-key substitutionauth.injection_location objectSubstitution location. The location is the request header; placeholders in the request body and query parameters are not replacedauth.injection_location.header booleanWhether to enable request-header substitutionmetadata objectCustom business key-value pairsarchived_at string | nullArchive time; null if not archivedcreated_at stringCreation time, ISO 8601updated_at stringLast update time, ISO 8601request_id stringUnique request identifier | Response |
Error codes
| HTTP status | Error code | Description |
|---|---|---|
| 400 | InvalidParameter | Required parameter missing or invalid. |
| 401 | InvalidApiKey | Invalid API-key provided. |