Data Endpoints
- Real Time Metrics
- / Features
Turn any filter into a ready-to-call API for your product, dashboards or spreadsheets. Configure it in the UI, call it with one POST.
From Filter to API
Configure it in the UI. Call it with one POST.
The Metrics API gives you full control, but your product usually needs the same handful of numbers over and over. An Endpoint saves that question once, so your app only has to ask for it.
- 1 Pick a filterUse any filter you've already built.
- 2 Choose the timingA single Lookback total, like the last 24 hours, or a Time Series.
- 3 Shape the groupingsReturn every value, fix a list, roll them up, or let callers choose at query time.
- 4 Name your fieldsPick the calculations to return, then set sorting and limits.
- Filter
- Impressions
- Groupings
- $.device.typeAll values @.item_idQuery time
- Fields
- L24_Total · Count L24_Uniques · Approx Distinct L24_yday_total · 24h offset
- Sort
- L24_Total descending, limit 20
device,L24_Total ios,26140 android,17320 web,4750
Built For Your Product
Each Endpoint returns exactly the fields you named, in a stable shape your code can depend on. Use it to build:
- Customer-facing usage dashboards. Use a Query Time grouping so each request only returns one customer's numbers.
- KPI tiles and charts. A Lookback powers a headline number, and a Time Series powers the chart next to it.
- Leaderboards. Sort by any field and limit results, including the top N items within each group.
- Spreadsheets & BI. Ask for
"format": "CSV"and get a header row plus your data.
curl -X POST \
https://app.aggregations.io/api/v1/data/{id} \
-H "x-api-token: $READ_KEY" \
-d '{"groupingFilters":
{"@.item_id": ["sku_123"]}}' [
{
"groupings": { "$.device.type": "ios" },
"fields": {
"L24_Total": 26140,
"L24_Uniques": 5120,
"L24_yday_total": 24480
}
},
{ ...android },
{ ...web }
] Change Answers, Not Code
Want a 7 day window instead of 24 hours? Need to compare against yesterday? Change it on the Endpoint and every caller gets the new behavior, with no code change or deploy.
- Durations & offsets per Endpoint, or per return field for side-by-side comparisons like today vs. yesterday.
- Incomplete interval handling so you decide whether the current, partial interval counts.
- Guardrails on filter changes: edits that would leave an Endpoint with no valid fields are blocked, and affected fields are flagged for you to fix.
How is an Endpoint different from the Metrics API?
With the Metrics API you build each request yourself: which filter, aggregation, calculation, time range and groupings. An Endpoint saves those choices in the UI, so callers only POST to its URL. You can change an Endpoint’s timing, fields or sorting without touching the code that calls it.
How do I authenticate requests?
Send an x-api-token header with an API key that has Read permission. API keys can read your organization’s data, so call Endpoints from your backend rather than directly from a browser or mobile app.
Can each of my customers see only their own data?
Yes. Add a grouping for your customer (or account, team, etc.) on your filter and set it to Query Time on the Endpoint. Your backend then passes that customer’s ID in groupingFilters, and only their results come back.
What formats can an Endpoint return?
JSON by default, or CSV by sending "format": "CSV". CSV responses include a header row, so they drop straight into spreadsheets and BI tools.
Can I query a time window in the past?
Yes. Pass an end timestamp in your request and the Endpoint’s duration is measured back from there. You can also set a fixed offset on the Endpoint, or on individual return fields to compare periods side by side, like today vs. yesterday.
How many results does an Endpoint return?
Lookback Endpoints return up to 1,000 items by default. Enable sorting to control the order and set your own limit, including a limit on inner groupings, such as the top 5 players per team.
What happens if I change the filter behind an Endpoint?
Safe changes go through. If a change would remove the last valid return field from an Endpoint, it’s blocked. Removed groupings come back empty and removed calculations return null, and the Endpoint editor highlights anything you need to fix. See the docs for details.