Usage Metrics
The AdminUsageController provides platform-wide usage data for monitoring consumption and identifying top users.
Endpoint
GET /api/admin/usage
Platform-Wide Summary
Returns aggregated metrics across the entire platform:
{
"api_requests": 1248000,
"storage_used_gb": 42.7,
"bandwidth_gb": 128.3,
"emails_sent": 8400,
"webhook_deliveries": 3200,
"active_subscriptions": 280
}
Filter by Organization
GET /api/admin/usage?org_id=5
Returns usage metrics scoped to a single organization, useful for investigating billing disputes or identifying heavy consumers.
Time Periods
Use the period query parameter to control the time window:
GET /api/admin/usage?period=today
GET /api/admin/usage?period=7d
GET /api/admin/usage?period=30d
today— current day only7d— last 7 days (default)30d— last 30 days
Top Organizations per Metric
Each response includes a breakdown of the highest-consuming organizations for key metrics:
{
"top_orgs": {
"api_requests": [
{ "org_id": 5, "org_name": "Acme Corp", "value": 320000 },
{ "org_id": 12, "org_name": "Globex Inc", "value": 215000 }
],
"storage_used_gb": [
{ "org_id": 8, "org_name": "Initech", "value": 8.2 },
{ "org_id": 5, "org_name": "Acme Corp", "value": 6.1 }
],
"emails_sent": [
{ "org_id": 3, "org_name": "Umbrella LLC", "value": 1400 }
]
}
}
This helps admins identify organizations that may be approaching plan limits or generating disproportionate load.