Skip to content
Go To Dashboard

Get analytics leaderboards

GET /v1/analytics/leaderboards

No authentication required.

ParameterTypeDefaultDescription
filter[time_period]string7dTime period for analytics
filter[limit]number5Number of entries per leaderboard (1-10)
Terminal window
curl -X GET "https://api.sapiom.ai/v1/analytics/leaderboards" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": {
"type": "analytics-leaderboards",
"id": "123e4567-e89b-12d3-a456-426614174000-7d",
"attributes": {
"timePeriod": "7d",
"topAgents": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "production-api",
"transactions": 18421,
"spend": "892.45",
"denials": 12
}
],
"topServices": [
{
"id": "123e4567-e89b-12d3-a456-426614174001",
"name": "OpenAI GPT-4",
"transactions": 22445,
"spend": "1245.67",
"denials": 234
}
],
"topRules": [
{
"id": "123e4567-e89b-12d3-a456-426614174002",
"name": "Daily Budget Limit",
"type": "spend",
"denials": 234
}
]
}
}
}