Skip to main content
Version: Next

Token API Specification Reference

The Token API provides HTTP methods for managing access tokens and permissions for the database.

info

The API is available only when the RS_API_TOKEN environment variable is set.

Get a List of Tokens​

The method returns a list of tokens with names and creation dates. To use this method, you need an access token with full access.

GET
/api/v1/tokens
Get a list of tokens

Show Information about a Token​

This method provides full information about a token except its values. The method requires an access token with full access.

GET
/api/v1/tokens/:token_name
Show information about a token

Create a New Token​

The method creates a new access token with given permissions as a JSON document in the request body. To use this method, you need an access token with full access.

POST
/api/v1/tokens/:token_name
Create a new access token

Update a Token​

The method updates an access token with given permissions as a JSON document in the request body. To use this method, you need an access token with full access.

PUT
/api/v1/tokens/:token_name
Update an access token

Remove a Token​

This method removes or revokes a token. To use it, a client should have an access token with full access.

DELETE
/api/v1/tokens/:token_name
Remove a token

Get Full Information about Current API Token​

This method takes a token from the Authentication header and returns its name, permissions, and additional information.

GET
/api/v1/me
Get full information about current API token