DROP API_TOKEN

Syntax

DROP API_TOKEN api_token_name;

Description

Drops an existing API_TOKEN. It can only be executed by the api_token owner.

DROP API_TOKEN cannot be undone. Use it with care!

Arguments

api_token_name

The name of the API_TOKEN to drop. For case-sensitive names, the name must be wrapped in double quotes, otherwise, the lowercased name will be used.

Examples

Drop an API_TOKEN

The following shows how to drop the Database named my_token:

mydb.public/prod# LIST API_TOKENS;
    Name   |         Created at          |      Last used       |      Expires at       
-----------+-----------------------------+----------------------+-----------------------
  my_token | 2023-12-19T16:55:59.958068Z | 0001-01-01T00:00:00Z | 2024-03-18T16:55:59Z  
mydb.public/prod# DROP API_TOKEN my_token;

Last updated