Skip to content
Product Docs

Usage Metrics

Aggregate Usage Metrics
GET/api/v1/admin/usage-metrics/aggregate
ModelsExpand Collapse
UsageMetricAggregateResponse object { buckets, group_by }

Response containing usage metrics aggregated by one or more dimensions.

buckets: array of object { dimensions, metric_count, total_credits, total_value }

The aggregation buckets, ordered by total credits descending

dimensions: map[string]

The dimension values that define this bucket

metric_count: number

Number of metric rows in this bucket

total_credits: number or string

Total credits consumed by metrics in this bucket

One of the following:
number
string
total_value: number

Total of the metric value field in this bucket

group_by: array of "day" or "event_type" or "organization_id" or 2 more

The dimensions the metrics were grouped by

One of the following:
"day"
"event_type"
"organization_id"
"project_id"
"user_id"