credentials

POST /api/v1/credentials/

Create a new credential

** Request Body Requirements **

There are multiple types of credentials and each has an expected shape for the secret and potentially other required or optional fields.

The following is a list of the credential types and their expected shapes:

#Username and Password - this is the only credential type that will allow you to specify a username
{
    "credential_type": "BASIC",
    "username": "my_username",
    "secret": {
        "password": "my_password"
    }
}

# Certificate
{
    "credential_type": "CERTIFICATE",
    "secret": {
        "certificate": "my_certificate",
        "key": "my_key", # optional
        "passphrase": "my_passphrase" # optional
    }
}

# Token - this is the option you want to store any kind of secret that doesn't fit into the other categories
{
    "credential_type": "TOKEN",
    "secret": {
        "secret": "my_secret"
    }
}

Request

Request body

credential_type'BASIC' | 'CERTIFICATE' | 'TOKEN' required
display_namestring required
descriptionstring
secretobject required
usernamestring

Response

idinteger
credential_type'BASIC' | 'CERTIFICATE' | 'TOKEN' | 'TOTP' required
display_namestring required
descriptionstring
hintstring
usernamestring
versionstring
used_secret_propertiesstring[]
created_bystring nullable

Changes

No recorded changes to this operation across all 1 revision of this API.