History window
GET /devices/{device_id}/telemetry takes an optional window:
| Parameter | Meaning |
|---|---|
after |
Earliest reading to return, RFC 3339. |
before |
Latest reading to return, RFC 3339. |
A timestamp sent without an offset is read as UTC.
The plan sets the span
Section titled “The plan sets the span”How wide one request’s window may be is your plan’s history_max_days, published on the account endpoint. Readings older than that are not lost — you reach them by moving the window back — but no single request may span more than it.
- Both bounds given: the window is exactly
aftertobefore. Wider thanhistory_max_daysis refused with422 range_too_large, andmax_daysin the response tells you the most you may ask for. - One bound given: the other is filled in
history_max_daysaway (capped at now). - Neither given: you get the most recent
history_max_daysof readings. history_max_daysisnull: the plan sets no maximum. With no bounds you get the most recent 30 days; with bounds, any explicit window is accepted.
after must be earlier than before; otherwise the request is refused with 422 invalid_request.
Reading a long range
Section titled “Reading a long range”Chunk it: walk backwards in windows no wider than max_days, and page within each window using its next_cursor (see Pagination). The window is carried inside the cursor, so a chunk stays anchored while you page through it.

