Skip to main content

Create a credential

POST 

/api/v1/Credential

Creates a credential (service account) that NPS uses to sign in to resources. If the request carries the ID of an existing credential and a domain, that credential is updated instead and set to the Configuration type. If the domain and user name already belong to a different credential, the call returns 409.

Permission required: Admin role.

Values for AuthenticationMethodType: 0 = Password, 1 = SshCertificate, 2 = SshCertificateAndPassword.

Values for CredentialType: -1 = Any, 0 = Configuration, 1 = User, 2 = Service, 3 = ActivityToken, 4 = Application, 5 = VaultUser, 6 = SshKeyCert.

Caution: The request body contains the account password or private key, so send it only over a secure connection and do not log it.

Request​

Responses​

The credential. Password, enable password, key and passphrase fields are left out.