ALTER API_TOKEN

Syntax

ALTER API_TOKEN api_token_name RENEW TOKEN;

Description

Arguments

api_token_name

This specifies the name of the API_TOKEN to modify.

Examples

Refresh an existing API_TOKEN

<no-db>/<no-store># LIST API_TOKENS;
+-----------+-------------------------------+-------------------------------+-------------------------------+
|  Name     |  Last Used                    |  Created At                   |  Expires At                   |
+===========+===============================+===============================+===============================+
| my_token  | 0001-01-01 00:00:00 +0000 UTC | 2024-06-04 22:54:55 +0000 UTC | 2024-09-02 22:54:55 +0000 UTC |
+-----------+-------------------------------+-------------------------------+-------------------------------+
<no-db>/<no-store># ALTER API_TOKEN my_token RENEW TOKEN;
+------------+------------+------------+------------------------------------------+------------------------------------------+
|  Type      |  Name      |  Command   |  Summary                                 |  Token                                   |
+============+============+============+==========================================+==========================================+
| api_token  | my_token   | ALTER      | api_token my_token was successfully      | <redacted_refreshed_api_token>           |
+------------+------------+------------+------------------------------------------+------------------------------------------+

Last updated