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.

Every list endpoint caps at 1000 rows per page. When more rows exist, the response includes a next_cursor field. Pass it as the cursor query parameter on your next request.

The shape

{
  "data": [ /* up to N rows */ ],
  "next_cursor": "eyJ0ZWFtX2lkIjoiYWJjZCIsImxhc3RfaWQiOiJlZmdoIn0="
}
When next_cursor is null, you’ve reached the end.

Curl example

# First page
curl -H "Authorization: Bearer $ST_API_KEY" \
  "https://api.1st.app/v1/sensors"

# Next page — paste next_cursor from above
curl -H "Authorization: Bearer $ST_API_KEY" \
  "https://api.1st.app/v1/sensors?cursor=eyJ0..."

Python loop

cursor = None
all_rows = []
while True:
    params = {"cursor": cursor} if cursor else {}
    resp = requests.get(
        f"{API_BASE}/v1/sensors",
        params=params,
        headers={"Authorization": f"Bearer {API_KEY}"},
    )
    resp.raise_for_status()
    page = resp.json()
    all_rows.extend(page["data"])
    cursor = page["next_cursor"]
    if not cursor:
        break

Why cursors and not page=2?

Cursors are stable against writes. With page=2&size=1000, a row inserted between your first and second page would shift everything down — you’d either see one row twice or miss a row entirely. Cursors anchor on the LAST row of the previous page, so new rows don’t change anything you’ve already seen.

Cursor scoping

Cursors are tied to the team the issuing API key was minted for. Using a cursor under a different team’s key returns cursor_team_mismatch. Cursors are opaque base64 — don’t try to decode and modify them. They may change shape across releases. If you need to “skip to row 5000”, that’s not supported — walk from the start.

Cursor errors

CodeWhat it meansWhat to do
cursor_invalidCursor is malformed or expired.Drop the cursor and start over.
cursor_team_mismatchCursor was issued for another team.Use the cursor from this team’s previous response.