Skip to main content

Documentation Index

Fetch the complete documentation index at: https://dev.1st.app/llms.txt

Use this file to discover all available pages before exploring further.

HTTP status: 400

Message

Time range exceeds the 90-day maximum. Split the range into windows of 90 days or fewer and concatenate the results.

Common cause

  • Asking for “all data ever” in a single call.
  • Off-by-one on the window math (e.g. requested 91 days).

Fix

Walk the range in 90-day windows client-side:
from datetime import timedelta

window = timedelta(days=90)
start, end = total_start, total_end
while start < end:
    chunk_end = min(start + window, end)
    page = api_get(f"/teams/{TEAM}/sensors/{S}/readings",
                   params={"from": iso(start), "to": iso(chunk_end)})
    process(page["data"])
    start = chunk_end
For very large historical pulls, consider GET /v1/readings.csv instead — single streaming call across many sensors.