Get a credential by ID
GET/api/v1/Credential/:credentialId
Returns one credential, including whether it is managed. Password, key and passphrase values are blank unless you set showPassword to true. For Admin users, showPassword has no effect on Configuration (service account) credentials, and each password view by an Admin is recorded as an event.
Permission required: Admin or App role, or the UserPlus role with the Credentials permission.
Values for CredentialType: -1 = Any, 0 = Configuration, 1 = User, 2 = Service, 3 = ActivityToken, 4 = Application, 5 = VaultUser, 6 = SshKeyCert.
Values for AuthenticationMethodType: 0 = Password, 1 = SshCertificate, 2 = SshCertificateAndPassword.
Caution: With showPassword set to true the response contains secrets in plain text, and a password view by an Admin is recorded as an event and forwarded to any configured SIEM.
Request
Responses
- 200
- 400
- 401
- 403
- 404
The credential, with an isManaged flag and its comment.
The credential ID was empty.
The built-in Administrator account asked to view the current password, which it cannot do.
The signed-in user does not have the required role or permission.
No credential exists with that ID.