Optimized endpoint for total/summary charts (pie, donut, radialBar, radar, polarArea). No time bucketing — returns aggregated totals per institution sorted by value. Top-N handled entirely in MongoDB via limit.
JWT token passed in x-access-token header
Time range (negative values for past periods)
-3
Metric to aggregate
count, credits, usage, cached, price "count"
Institution ID
Account ID
Used only for date range calculation (dayFactor)
day, week, month, hour "month"
When true, aggregates across all institutions
false
Number of top institutions to return
5