Updating a Token
Only the token creator or another privileged user can update a token. The following attributes of an existing token can be edited:
• | tokenName |
• | tokenDescription |
• | expiryStr |
Note:You cannot change the token expiry to a value in the past.
You cannot change the user name or token type. Expired tokens cannot be updated.
Note:For a description of token attributes, see Token Attributes.
Call the /token/{tokenName} endpoint using PUT, where you pass the name of the token that you want to update as a path parameter. Note that the token name is case sensitive.
In the request body, pass the parameters that you want to update.
Item |
Description |
URI |
/uar/v1/token/{tokenName} |
Method |
PUT |
Query parameters |
N/A |
Request body |
{ "expiryStr": "string", "tokenDescription": "string", "tokenName": "string", } |
Response codes |
204: Success, no content. |
Sample Request
The following request updates the expiry, token description and token name.
{
"expiryStr": "10M",
"tokenDescription": "updateddescription",
"tokenName": "updatedtoken",
}
Sample Response
If the request is successful, the status code 204 is returned, but no response is provided.