Get usage statistics
GET
/v1/usage
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Get, RequestUri = new Uri("https://api.disasm.dev/v1/usage?period=24h"), Headers = { { "Authorization", "Bearer <token>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.disasm.dev/v1/usage?period=24h"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://api.disasm.dev/v1/usage?period=24h';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”period
string
Time period to report on.
key_id
string format: uuid
Filter usage to a specific API key ID.
Responses
Section titled “Responses”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 } ]}Headers
Section titled “Headers”X-RateLimit-Limit
integer
Example
60Maximum requests per minute (60).
X-RateLimit-Remaining
integer
Example
59Requests remaining in the current window.
X-RateLimit-Reset
integer
Example
1718000000Unix 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"}Headers
Section titled “Headers”X-RateLimit-Limit
integer
Example
60Maximum requests per minute (60).
X-RateLimit-Remaining
integer
Example
59Requests remaining in the current window.
X-RateLimit-Reset
integer
Example
1718000000Unix timestamp when the rate limit resets.