Skip to main content

Set Admin API key

post
/api/pvlt/1.0/ctl/iam/admin/set-api-key

Set the Admin user's API key.

Vault always has an administrative user account with the user name Admin. You use this account to update the configuration of Vault.

The API key should meet the specified criteria:

  • It must be at least 15 characters long.
  • It must contain a combination of digits, lowercase letters, and uppercase letters.

This API is restricted to the Admin user.

The Admin user API key can also be set using the PVAULT_SERVICE_ADMIN_API_KEY environment variable.

Request

Query parameters

  • custom_audit - string

    Custom audit information to be included in the audit log.

Request body

The API key of the Admin user to set.

object required*
  • key - string required*

    The new API key for the Admin user.

Example
{
"key": "string"
}

Possible responses

The request is successful.

Try the API

Authorization

Query parameters

Request body

Navigate to the docs of your local Vault installation to try the API directly from there.

Code examples

Example