Skip to main content

Token

View as Markdown

Get

GET /api/2.0/token-management/tokens/{token_id}

Gets information about a token, specified by its ID.

API scopes: authentication

Parameters

token_idstringpath

The ID of the token to get.

Response

token_infoobject
Show child attributesHide child attributes
token_idstring

ID of the token.

Example: 5684c955822ac792a51ae2aeb80190f13457bab3e2e2934c133a08b38454816c

creation_timeint64

Timestamp when the token was created.

Example: 1580265020299

expiry_timeint64

Timestamp when the token expires.

Example: 1580265020299

commentstring

Comment that describes the purpose of the token, specified by the token creator.

Example: This is for the ABC department automation scripts.

created_by_idint64

User ID of the user that created the token.

Example: 202480738464078

created_by_usernamestring

Username of the user that created the token.

Example: jsmith@example.com

owner_idint64

User ID of the user that owns the token.

Example: 202480738464078

workspace_idint64

If applicable, the ID of the workspace that the token was created in.

Example: 5750939285643220

last_used_dayint64

Approximate timestamp for the day the token was last used. Accurate up to 1 day.

Example: 1710374400000

scopesarray of string

Scope of the token was created with, if applicable.

Delete

DELETE /api/2.0/token-management/tokens/{token_id}

Deletes a token, specified by its ID.

API scopes: authentication

Parameters

token_idstringpath

The ID of the token to revoke.

Create On Behalf Of Token

POST /api/2.0/token-management/on-behalf-of/tokens

Creates a token on behalf of a service principal.

API scopes: authentication

CloudsAWSGCP

Request body

application_idstring

Application ID of the service principal.

Example: 6f5ccf28-d83a-4957-9bfb-5bbfac551410

lifetime_secondsint64

The number of seconds before the token expires.

Example: 3600

commentstring

Comment that describes the purpose of the token.

Example: This is for the ABC department automation scripts.

scopesarray of string

Response

token_valuestring

Value of the token.

token_infoobject
Show child attributesHide child attributes
token_idstring

ID of the token.

Example: 5684c955822ac792a51ae2aeb80190f13457bab3e2e2934c133a08b38454816c

creation_timeint64

Timestamp when the token was created.

Example: 1580265020299

expiry_timeint64

Timestamp when the token expires.

Example: 1580265020299

commentstring

Comment that describes the purpose of the token, specified by the token creator.

Example: This is for the ABC department automation scripts.

created_by_idint64

User ID of the user that created the token.

Example: 202480738464078

created_by_usernamestring

Username of the user that created the token.

Example: jsmith@example.com

owner_idint64

User ID of the user that owns the token.

Example: 202480738464078

workspace_idint64

If applicable, the ID of the workspace that the token was created in.

Example: 5750939285643220

last_used_dayint64

Approximate timestamp for the day the token was last used. Accurate up to 1 day.

Example: 1710374400000

scopesarray of string

Scope of the token was created with, if applicable.