Skip to content

API Key Usage Statistics

GET
/api/api-keys/usage

Get aggregate usage statistics across all API keys for the current user.

Authorizations

ApiKeyAuth

API key for authentication. Get your API key from the dashboard.

TypeAPI Key (header: X-Api-Key)

Responses

Usage statistics

application/json
JSON
{
"data": {
"type": "api-key-usage",
"id": "aggregate",
"attributes": {
"period": "string",
"startDate": "string",
"endDate": "string",
"summary": {
"totalRequests": 0,
"avgLatencyMs": 0,
"errorRate": 0,
"uniqueEndpoints": 0
},
"timeSeries": {
"labels": [
"string"
],
"requests": [
0
],
"avgLatency": [
0
]
},
"byEndpoint": [
{
"endpoint": "string",
"requests": 0,
"avgLatencyMs": 0
}
],
"byApiKey": [
{
"apiKeyId": "string",
"apiKeyName": "string",
"requests": 0,
"avgLatencyMs": 0,
"lastRequest": "string"
}
]
}
}
}

Playground

Authorization

Samples

Powered by VitePress OpenAPI

AstroAPI Documentation