CREATE API_TOKEN

Syntax

CREATE API_TOKEN api_token_name;

Description

An API_TOKEN can be used for automated systems to access Deltastream. A token must be renewed every 90 days. Use ALTER API_TOKEN command to refresh an existing API_TOKEN.

When an API_TOKEN is used it assumes all organizations, roles, and priviledges of the creator.

Arguments

api_token_name

This specifies the name of the new API_TOKEN. This name is only used for managing the API token within the Organization.

Examples

Create a new API_TOKEN

The following creates an API_TOKEN named my_token.

<no-db>/<no-store># CREATE API_TOKEN my_token;
+------------+------------+------------+------------------------------------------+------------------------+
|  Type      |  Name      |  Command   |  Summary                                 |  Token                 |
+============+============+============+==========================================+========================+
| api_token  | my_token   | CREATE     | api_token my_token was successfully      | <api_token_redacted>   |
+------------+------------+------------+------------------------------------------+------------------------+

Use an API_TOKEN with cli

$ /deltastream-cli -a [my-access-token]
mydb.public/prod# 

Use an API_TOKEN with cli - env property

$ DS_TOKEN=[my-access-token]
$ /deltastream-cli
mydb.public/prod# 

Last updated