Skip to main content
Premium

Aggregations

An opt-in per-resource endpoint returning server-side count / sum / avg / min / max, optionally grouped by a field value, a date bucket or a numeric range.

It reuses the list's filter backend, so every filter valid on /admin/<resource> is valid on /admin/<resource>/aggregate too — a chart and the list beneath it can be driven by one filter set.

Pages​

PageWhat it covers
Enabling the aggregate endpointTurning it on for a resource
Field aggregation whitelistWhich fields may be aggregated and grouped
Querying the endpointThe request and response format
Extending aggregate functionsAdding a function of your own
caution

The feature is off by default and every field has to be whitelisted explicitly. The whitelist is not a convenience — it is what keeps a caller from aggregating over columns you never meant to expose.

See also​