Filter or aggregate one parsed dataset
Path Parameters
Dataset from /v1/analytics/datasets. If supplied in the body it must match this path.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Group matching parsed rows and calculate counts, exact distinct counts, sums, averages and extrema. Both minLedger and maxLedger are required and the inclusive range may cover at most 1,000,000 ledgers. At most 8 group columns, 16 metrics and 64 filters. orderBy names group columns or metric aliases; group keys break ties. No arbitrary SQL, joins, windows or current-state reconstruction. A partial coverage result is not a complete-history answer. Group keys and metrics are strings or null; Float sources and averages remain approximate. Empty count=0; empty sum/avg/min/max=null. Follow nextOffset with identical filters; continuing ingestion means pages are not snapshot-pinned.
Representative bounded query for one historical ledger. This example does not promise that the selected dataset range is currently ingested.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/analytics/datasets/history_operations/query" \ -H "Content-Type: application/json" \ -d '{ "minLedger": 63490364, "maxLedger": 63490364, "groupBy": [ "type_string" ], "aggregations": [ { "function": "count", "alias": "operations" } ], "orderBy": [ { "field": "operations", "direction": "desc" } ], "limit": 20, "offset": 0 }'{ "columns": [ "type_string", "operations" ], "dataset": "history_operations", "elapsedMilliseconds": 8.5, "limit": 20, "offset": 0, "rows": [ { "type_string": "invoke_host_function", "operations": "1" } ], "nextOffset": null, "coverage": { "completedRanges": [ { "firstLedger": "2", "lastLedger": "63489999" }, { "firstLedger": "63490304", "lastLedger": "63490367" } ], "contiguousFirstLedger": "2", "contiguousLastLedger": "63489999", "contiguousLedgerCount": "63489998", "supplementalLedgerCount": "64", "totalLedgerCount": "63490062", "nextLedger": "63490000", "minimumLedger": "2", "maximumLedger": "63490367", "gapCount": 1 }, "coverageStatus": "complete", "window": { "minLedger": 63490364, "maxLedger": 63490364 }, "aggregates": [ { "alias": "operations", "function": "count", "field": null, "sourceType": null, "valueEncoding": "string-or-null", "approximate": false } ], "semantics": "Aggregates of completed, digest-matched rows; not reconstructed current state. Pagination is not snapshot-pinned."}