API tokens
Preview

How much a token was used in the last 30 days

GET
/api-tokens/{tokenId}/usage
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

tokenId*string
Formatuuid

Response Body

Counts of the token's calls.

application/json
  1. response
days*integer

How many days the counts cover.

total*integer
allowed*integer
denied*integer
limited*integer
lastUsedAt?string
Formatdate-time
Example Request
curl -X GET 'https://wardn.example.com/api/v1/api-tokens/497f6eca-6276-4993-bfeb-53cbbbba6f08/usage'
Example Response
{  "days": 0,  "total": 0,  "allowed": 0,  "denied": 0,  "limited": 0,  "lastUsedAt": "2019-08-24T14:15:22Z"}