Get analytics leaderboards
Endpoint
Section titled “Endpoint”GET /v1/analytics/leaderboards
Authentication
Section titled “Authentication”No authentication required.
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
filter[time_period] | string | 7d | Time period for analytics |
filter[limit] | number | 5 | Number of entries per leaderboard (1-10) |
cURL Example
Section titled “cURL Example”curl -X GET "https://api.sapiom.ai/v1/analytics/leaderboards" \ -H "Authorization: Bearer YOUR_API_KEY"Response
Section titled “Response”{ "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 } ] } }}