EndpointsList API tokens

API Tokens

List API tokens

Returns metadata for your own API tokens. Full token values are never shown after creation.

GET/api_tokens
Authorizationstringheaderrequired

Bearer token for the authenticated caller.

cursorstring

Pagination cursor from a previous response's next_cursor.

limitintegerdefault:50

Items per page (1-100, default 50)

Required range: 1 <= x <= 100

Example: 50

Response

application/json

Your API tokens, newest first

dataobject[]required
child attributes
data.idstringrequired

API token ID.

Required string length: 3 - 54

Example: "tok_3k9x2mfq8a1b7c4d5e6f"

data.namestringrequired

Required string length: 1 - 100

Example: "My CLI token"

data.prefixstringrequired

The first 12 characters of the token, for recognizing it. Never the secret.

Example: "sk_akua_a3B2"

data.workspace_idstring | nullrequired

The only Workspace the token may act in. Omitted or null: every Workspace the person may use.

Required string length: 2 - 53

Example: "ws_j572abc123def4"

data.rolesstring[] | nullrequired

A ceiling of IAM roles: the token may do only what one of these roles includes, and only what the person may. Omitted or null: the rights of the person.

Required array length: 1 - 16 elements

Example: ["roles/viewer"]

data.created_atintegerrequired

Unix timestamp (seconds)

Required range: x >= 0

data.last_used_atinteger | nullrequired

Unix timestamp (seconds) of last use, or null if never used

Required range: x >= 0

data.expires_atinteger | nullrequired

Unix timestamp (seconds) when the token expires, or null if never

Required range: x >= 0

has_morebooleanrequired

True if more items exist after this page.

next_cursorstring | nullrequired

Opaque cursor for the next page, or null if no more pages.