Skip to content

Get token statistics

GET
/api/admin/stats/tokens
Code sample: Shell / cURL
curl --request GET \
--url 'https://auth.example.com/api/admin/stats/tokens?from=2026-04-15T12%3A00%3A00Z&to=2026-04-15T12%3A00%3A00Z' \
--header 'Authorization: Bearer <token>'

Returns active session-token counts and today’s issued/revoked token counters from audit logs. Retained whole-row archives are included in supported log queries. A bounded query that cannot read its required rows returns log_query_incomplete instead of partial statistics or an empty success.

from
required
string format: date-time

Inclusive start of the statistics period.

to
required
string format: date-time

Inclusive end of the statistics period.

Token activity counters for the requested period and current active sessions.

Media type application/json
object
access_tokens
object
active
integer
issued_today
integer
revoked_today
integer
key
additional properties
refresh_tokens
object
active
integer
issued_today
integer
revoked_today
integer
key
additional properties
period
object
from
string format: date-time
to
string format: date-time
key
additional properties
key
additional properties
Example
{
"access_tokens": {
"active": 42,
"issued_today": 510,
"revoked_today": 8
},
"refresh_tokens": {
"active": 39,
"issued_today": 120,
"revoked_today": 2
},
"period": {
"from": "2026-06-01T00:00:00.000Z",
"to": "2026-06-02T00:00:00.000Z"
}
}
X-Authrim-Log-Consistency
string
Allowed values: snapshot eventual local_hot_only

Snapshot for the remote scheduled view; eventual when Pipeline visibility can lag ingestion; local_hot_only for local scheduled staging without a remote Catalog.

X-Authrim-Log-Pending-Deliveries
integer

Tenant deliveries not yet confirmed visible. Omitted for self-service subjects. Zero does not guarantee immediate Pipeline visibility.

X-Authrim-Log-Complete
boolean

True only for a complete bounded snapshot query. Pipeline responses remain false; incomplete reads return 503.

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}

The retained log query is incomplete. No partial entries or statistics are returned as a successful result. Narrow the period or retry.

Media type application/json
object
error
required
string
Allowed value: log_query_incomplete
error_description
required
string
complete
required
boolean
key
additional properties
Example
{
"error": "log_query_incomplete",
"complete": false
}