API Tokens

REST API operations for api tokens

Overview

Use these API operations to interact with API tokens in Panther. An API token can rotate itself using the POST api-tokens/self/rotate endpoint.

To call the API, see the How to use the Panther REST API instructions—including directions for how to invoke it directly from this documentation page.

Required permissions

  • For GET operations, your API token must have the Read API Token Info permission.

  • For POST and DELETE operations, your API token must have the Manage API Tokens permission.

Operations

Create an api token

post
Authorizations
X-API-KeystringRequired
Body
allowedCIDRBlocksstring[]Optional

The set of CIDR blocks that are allowed to use this API token. If empty, all CIDR blocks are allowed

namestringRequired

The name of the token

Responses
chevron-right
200

OK response.

application/json
allowedCIDRBlocksstring[]Optional

The set of CIDR blocks that are allowed to use this API token. If empty, all CIDR blocks are allowed

createdAtstringRequired

Time when the API token was created

expiresAtstringOptional

Time when the API token will expire. Will be null if the token is non-expiring

idstringRequired

The unique identifier of the token

lastUsedAtstringOptional

The last time this token was used to authenticate

namestringRequired

The name of the token

rotatedAtstringOptional

Time when the API token was rotated

updatedAtstringOptional

Time when the API token was updated

valuestringOptional

The API token value, only populated during create and rotate actions

post
/api-tokens

Get an api token

get
Authorizations
X-API-KeystringRequired
Path parameters
idstringRequired

ID of the api token. Note: if self is provided, the current api token will be returned

Responses
chevron-right
200

OK response.

application/json
allowedCIDRBlocksstring[]Optional

The set of CIDR blocks that are allowed to use this API token. If empty, all CIDR blocks are allowed

createdAtstringRequired

Time when the API token was created

expiresAtstringOptional

Time when the API token will expire. Will be null if the token is non-expiring

idstringRequired

The unique identifier of the token

lastUsedAtstringOptional

The last time this token was used to authenticate

namestringRequired

The name of the token

rotatedAtstringOptional

Time when the API token was rotated

updatedAtstringOptional

Time when the API token was updated

valuestringOptional

The API token value, only populated during create and rotate actions

get
/api-tokens/{id}

Update an api token

post
Authorizations
X-API-KeystringRequired
Path parameters
idstringRequired

ID of the api token. Note: if self is provided, the current api token will be updated

Body
allowedCIDRBlocksstring[]Optional

The set of CIDR blocks that are allowed to use this API token. If empty, all CIDR blocks are allowed

namestringRequired

The name of the token

Responses
chevron-right
200

OK response.

application/json
allowedCIDRBlocksstring[]Optional

The set of CIDR blocks that are allowed to use this API token. If empty, all CIDR blocks are allowed

createdAtstringRequired

Time when the API token was created

expiresAtstringOptional

Time when the API token will expire. Will be null if the token is non-expiring

idstringRequired

The unique identifier of the token

lastUsedAtstringOptional

The last time this token was used to authenticate

namestringRequired

The name of the token

rotatedAtstringOptional

Time when the API token was rotated

updatedAtstringOptional

Time when the API token was updated

valuestringOptional

The API token value, only populated during create and rotate actions

post
/api-tokens/{id}

delete api token

delete
Authorizations
X-API-KeystringRequired
Path parameters
idstringRequired

ID of the api token to delete. Note: if self is provided, the current api token will be deleted

Responses
delete
/api-tokens/{id}

No content

List api tokens

get
Authorizations
X-API-KeystringRequired
Responses
chevron-right
200

OK response.

application/json
nextstringOptional

Pagination token for the next page of results

get
/api-tokens
200

OK response.

Rotate an api token. If self is provided the current token will be rotated

post
Authorizations
X-API-KeystringRequired
Path parameters
idstringRequired

ID of the api token to rotate. Note: if self is provided, the current api token will be rotated

Responses
chevron-right
200

OK response.

application/json
allowedCIDRBlocksstring[]Optional

The set of CIDR blocks that are allowed to use this API token. If empty, all CIDR blocks are allowed

createdAtstringRequired

Time when the API token was created

expiresAtstringOptional

Time when the API token will expire. Will be null if the token is non-expiring

idstringRequired

The unique identifier of the token

lastUsedAtstringOptional

The last time this token was used to authenticate

namestringRequired

The name of the token

rotatedAtstringOptional

Time when the API token was rotated

updatedAtstringOptional

Time when the API token was updated

valuestringOptional

The API token value, only populated during create and rotate actions

post
/api-tokens/{id}/rotate

Last updated

Was this helpful?