GET /api/kpis/:name
Fetch KPI values for a given name and optional date range.
Query parameters
| name | Path param. KPI name. Example: snapshot.companies.total_count |
|---|---|
| from | ISO date YYYY-MM-DD. Start date inclusive. If omitted, range is unbounded at the start. |
| to | ISO date YYYY-MM-DD. End date inclusive. If omitted, range is unbounded at the end. |
Example requests
curl "http://localhost:3000/api/kpis/snapshot.companies.total_count?from=2025-09-01&to=2025-09-10"
curl "http://localhost:3000/api/kpis/snapshot.companies.fit_total_count?from=2025-09-01&to=2025-09-10"
Response
200 OK
{
"items": [
{ "name": "snapshot.companies.total_count", "date": "2025-09-01", "value": "120", "unit": "count" },
{ "name": "snapshot.companies.total_count", "date": "2025-09-02", "value": "122", "unit": "count" }
]
}
Returns records ordered by date ascending. Invalid dates or inverted ranges return 400 Bad Request.