Read a typed time range
POST /scan returns points and execution statistics for a bounded interval. Unlike a SQL result, points keep their explicit tag and field types.
Select a range and projection
curl --fail-with-body http://127.0.0.1:9070/scan \
-H 'Content-Type: application/json' \
--data-binary '{"table":"temperature","start":1791504000000000000,"end":1791504002000000000,"columns":["device","value"]}'
start is inclusive and end is exclusive. Both are optional signed 64-bit nanoseconds. Omitting either bound includes that end of the timestamp domain. Equal bounds produce no rows; reversed bounds are invalid.
Apply typed filters
{
"table": "temperature",
"start": 1791504000000000000,
"end": 1791504002000000000,
"columns": ["device", "value"],
"equals": {
"device": {"String": "dev-001"},
"value": {"Float": 21.5}
}
}
Equality predicates are ANDed. Tags use String; fields use Integer, Float, Boolean, or String as appropriate. A type mismatch is an error, not an implicit conversion.
Interpret the response
A successful response contains points and stats. The timestamp is always returned, even if it is not in columns. Without a projection, all known columns are selected. Missing values are absent from point maps.
Points sort by time, identity, and original batch/line order. Deduplication resolves the latest logical row before equality filters are evaluated, so an obsolete matching version cannot reappear.
Scan limits
There is no scan pagination or silent truncation. The sample limit is 10,000 returned rows and 4 MiB of encoded response. A larger result returns 429; narrow the interval or projection instead of assuming the partial body is usable.
Input is bounded by the smaller of max_body_bytes and 64 KiB. Unknown tables, columns, or JSON keys fail validation. The response's snapshot_batch is local to one storage instance, not a global transaction ID.
Understand the statistics
Statistics describe files and row groups considered, columns read, physical versions examined, and logical rows returned. A small result can still require substantial work. Equality predicates are residual filters after deduplication; they are not a secondary-index lookup.