Skip to main content

Update user API key expiration

post
/api/pvlt/1.0/ctl/iam/user/update-expiration

Update a user's API key expiration.

The role that performs this operation must have the CapIAMWriter capability. See Access control for more information about how capabilities are used to control access to operations.

Request

Request body

The name of the user and the expiration in seconds to update API key.

object required*
  • name - string required*

    The name of the user.

  • expiration_secs - integer required*

    The number of seconds from now until the user's token expires.

Example
{
"name": "string",
"expiration_secs": 0
}

Possible responses

The request is successful.

object required*
  • name - string required*

    The user name.

  • api_key_expiry - string required*

    The expiry time of the API key.

Example
{
"name": "some_user",
"api_key_expiry": "2022-07-05T08:47:12.047Z"
}

Try the API

Authorization

Request body

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

Code examples

Example