Tokens are secret keys that allow you to authenticate against your Cockpit’s regional data sources and Alert manager. Make sure that you create your tokens in the same regions as the data sources you want to use them for.
List tokens
Retrieve a list of all tokens in the specified region. By default, tokens returned in the list are ordered by creation date, in ascending order. You can filter tokens by Project ID and token scopes.
path Parameters
regionThe region you want to target
query Parameters
project_idID of the Project the tokens belong to.
token_scopesToken scopes to filter for.
pagePage number to return, from the paginated results.
page_sizeNumber of tokens to return per page.
order_byOrder in which to return results.
List tokens › Responses
total_countTotal count of tokens matching the request.
Tokens matching the request within the pagination.
Create a token
Give your token the relevant scopes to ensure it has the right permissions to interact with your data sources and the Alert manager. Make sure that you create your token in the same regions as the data sources you want to use it for. Upon creation, your token's secret key display only once. Make sure that you save it.
path Parameters
regionThe region you want to target
Create a token › Request Body
project_idID of the Project the token belongs to.
nameName of the token.
token_scopesToken permission scopes.
Create a token › Responses
idID of the token.
project_idID of the Project the token belongs to.
nameName of the token.
created_atToken creation date. (RFC 3339 format)
updated_atToken last modification date. (RFC 3339 format)
Token permission scopes.
secret_keyToken secret key.
regionRegions where the token is located.
Get a token
Retrieve information about a given token, specified by the token ID. The token's information such as its scopes, is returned.
path Parameters
regionThe region you want to target
token_idToken ID.
Get a token › Responses
idID of the token.
project_idID of the Project the token belongs to.
nameName of the token.
created_atToken creation date. (RFC 3339 format)
updated_atToken last modification date. (RFC 3339 format)
Token permission scopes.
secret_keyToken secret key.
regionRegions where the token is located.
Delete a token
Delete a given token, specified by the token ID. Deleting a token is irreversible and cannot be undone.
path Parameters
regionThe region you want to target
token_idID of the token to delete.