Developer API: usage
Calls, errors and latency per day and bucket for your key's environment.
Inicie sesión para ver su propio ID de cliente de prueba en los ejemplos.
GET https://developers.aton-network.org/api/v1/usage
When to use it
In your own dashboards and alerts, for example to warn before you reach a daily limit.
Authentication
Authorization: Bearer <API key> with the usage:read right.
Parameters
| Name | In | Type | Required | Limits | What it is |
|---|---|---|---|---|---|
Authorization | header | string | yes | An API key with usage:read. | |
days | query | integer | no | 1 to 90, default 7 | How many days back, today included. |
Request
# Calls, errors and latency per day and bucket, for the last seven days. Needs usage:read.
curl "https://developers.aton-network.org/api/v1/usage?days=7" \
-H "Authorization: Bearer $ATHERON_API_KEY"# Calls, errors and latency per day and bucket for the last seven days. Needs usage:read; costs 1.
curl https://developers.aton-network.org/api/graphql \
-H "Authorization: Bearer $ATHERON_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"query Usage($days: Int = 7) {\n usage(days: $days) {\n env\n days\n usage {\n day\n bucket\n calls\n errors\n msAvg\n msMax\n }\n }\n}\n","variables":{"days":7}}'In GraphQL
Query.usage at POST https://developers.aton-network.org/api/graphql, with the usage:read right, costing 1. Calls, errors and latency per day and bucket for the key's environment, 1 to 90 days (anything else is brought within, as REST does).
Variables:
The answer:
Errors it can meet: invalid_key, missing_right, rate_limited, server_error. Try it in the GraphQL playground.
query Usage($days: Int = 7) {
usage(days: $days) {
env
days
usage {
day
bucket
calls
errors
msAvg
msMax
}
}
}{
"days": 7
}{
"data": {
"usage": {
"env": "TEST",
"days": 7,
"usage": [
{
"day": "2026-10-14",
"bucket": "token",
"calls": 42,
"errors": 1,
"msAvg": 38,
"msMax": 210
}
]
}
},
"extensions": {
"cost": 1
}
}Response
HTTP 200
content-type: application/json
{
"env": "live",
"days": 7,
"usage": [
{ "day": "2026-10-14", "bucket": "token", "calls": 1203, "errors": 4, "ms_avg": 38, "ms_max": 412 },
{ "day": "2026-10-14", "bucket": "userinfo", "calls": 2210, "errors": 0, "ms_avg": 22, "ms_max": 190 }
]
}Errors
| HTTP | error | Cause | Fix |
|---|---|---|---|
| 401 | invalid_key | No API key was sent, or it is not one of ours, expired or revoked. | Send Authorization: Bearer with a key from the app's API keys page. |
| 403 | missing_right | The key does not carry the right this call needs. | Make a key with the right (app:read or usage:read). |
| 429 | rate_limited | Over your quota for this bucket, this minute or this day. | Wait the Retry-After seconds. Requests over the limit still count, so a retry loop keeps you over it. |
| 500 | server_error | Something went wrong at our end. | Try again in a moment. If it keeps happening, check the status page and tell us in the chat. |
Good to know
- A day with no calls in a bucket is left out rather than listed as zero.
Security
- Never put an API key in a URL or in code that ships to a browser.
Pregunte a Atlas
Asistente de IAPregunte lo que quiera sobre Iniciar sesión con Atheron, la API o el portal. La respuesta sale de nuestra documentación, con enlaces a las páginas usadas.