Skip to content

Get usage statistics

GET
/v1/usage
curl --request GET \
--url 'https://api.disasm.dev/v1/usage?period=24h' \
--header 'Authorization: Bearer <token>'

Get usage statistics with time-series chart data. Supports filtering by time period and API key.

period
string
default: 7d
Allowed values: 24h 7d 30d 90d

Time period to report on.

key_id
string format: uuid

Filter usage to a specific API key ID.

Usage statistics for the requested period.

Media typeapplication/json
object
period

The time period this data covers.

string
overview
object
today
integer
this_week
integer
this_month
integer
total
integer
chart

Time-series request counts for the period.

Array<object>
object
time
string format: date-time
requests
integer

Example

{
"period": "7d",
"overview": {
"today": 1250,
"this_week": 8400,
"this_month": 32100,
"total": 145600
},
"chart": [
{
"time": "2026-04-08T00:00:00Z",
"requests": 1200
},
{
"time": "2026-04-09T00:00:00Z",
"requests": 1350
},
{
"time": "2026-04-10T00:00:00Z",
"requests": 980
}
]
}
X-RateLimit-Limit
integer
Example
60

Maximum requests per minute (60).

X-RateLimit-Remaining
integer
Example
59

Requests remaining in the current window.

X-RateLimit-Reset
integer
Example
1718000000

Unix timestamp when the rate limit resets.

Missing or invalid API key.

Media typeapplication/json
object
error

A human-readable message describing what went wrong.

string

Example

{
"error": "Missing or invalid API key"
}

Rate limit exceeded. See the X-RateLimit-* response headers.

Media typeapplication/json
object
error

A human-readable message describing what went wrong.

string

Example

{
"error": "Rate limit exceeded"
}
X-RateLimit-Limit
integer
Example
60

Maximum requests per minute (60).

X-RateLimit-Remaining
integer
Example
59

Requests remaining in the current window.

X-RateLimit-Reset
integer
Example
1718000000

Unix timestamp when the rate limit resets.