Count and group business data
The measuring tool. Call it with no dataset to list what can be measured in this organisation; call it with one to get numbers. Every dataset is gated on the owning module’s own read permission, so the catalog is already narrowed to what you may see. Prefer this over listing records and counting them yourself: it aggregates in the database and returns tens of rows instead of thousands. range narrows every dataset except a snapshot of the present, which the catalog marks windowed: false — a dataset’s supports_time_buckets: false only means time cannot be an AXIS on it, never that the window is ignored. So «how many invoices this month» is one call: the by-type dataset, grouped by type, with range: "this_month".
Examples
- What can you measure? GET /api/v1/rest/analytics
- How many invoices did we file this month? GET /api/v1/rest/analytics?dataset=documents.count_by_type&dimension=type&range=this_month
- How many documents did we file each day this month? GET /api/v1/rest/analytics?dataset=documents.ingest_over_time&dimension=period&range=this_month
Request
- Base URL: https://api.custodo.ai
- URL: https://api.custodo.ai/api/v1/rest/analytics
- Auth: HTTP bearer
Query parameters
A dataset key from a previous catalog call. Omit to list the catalog.
Which axis to group by. Omit for the dataset’s default.
A named window, applied to EVERY dataset. Use custom with from/to for anything else. Omit to measure all of time.
Dataset-declared filters only; anything else is ignored.
Headers
The organisation to act in. An API key is bound to exactly one, so this is optional for a key and must match the one it was minted for.
Response
Done. data is the tool’s own answer.
Changes
No recorded changes to this operation across all 1 revision of this API.