Skip to main content
GET
/
devices
/
{device_id}
/
readings
History for one device
import requests

url = "https://api.1st.app/v1/devices/{device_id}/readings"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
{
  "data": [
    {
      "bucket_at": "2026-05-14T20:35:00Z",
      "co2_ppm": 920,
      "temp_c": 21.8,
      "humidity_pct": 51.2,
      "lux": 410,
      "spl_db": 52,
      "ingested_at": "2026-05-14T20:35:42Z"
    },
    {
      "bucket_at": "2026-05-14T20:30:00Z",
      "co2_ppm": 905,
      "temp_c": 21.7,
      "humidity_pct": 51,
      "lux": 415,
      "spl_db": 49.8,
      "ingested_at": "2026-05-14T20:30:38Z"
    }
  ],
  "next_cursor": "eyJ0ZWFtX2lkIjoi..."
}

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.

Authorizations

Authorization
string
header
required

Your API key. Create one at dashboard.1st.app/integrations/api-keys.

Path Parameters

device_id
string<uuid>
required

The UUID of the device you want. You get a device's ID from GET /v1/devices (look at the device_id field) or by copying it from the dashboard URL.

Example:

"8a72a1c7-3c91-4f5b-b39e-1d2c4e3f5a7b"

Query Parameters

from
string<date-time>
required

The earliest time you want readings from. The reading right at this exact moment is included.

Format the timestamp like 2026-05-10T00:00:00Z. That's ISO 8601 with a Z on the end to mean UTC. To pull "all of May 10 in UTC", use 2026-05-10T00:00:00Z.

If your team is on UK time and you want "May 10 local", convert it to UTC first.

Example:

"2026-05-10T00:00:00Z"

to
string<date-time>
required

The end time. Readings at this exact moment are not included, so to pull a full day, set from to midnight on day 1 and to to midnight on day 2.

Same format as from: 2026-05-11T00:00:00Z.

Must be later than from. The total range can't be more than 90 days; split longer pulls into multiple calls.

Example:

"2026-05-11T00:00:00Z"

cursor
string

For long time ranges that return more than 1000 readings.

On your first call, leave this empty. If the response includes a next_cursor value, there are more readings waiting. Send that value back here on your next call to get the next batch. Repeat until next_cursor comes back as null.

Like a bookmark for the API: save your place, pick up where you left off. You don't need to understand the value itself, just send it back as-is.

Example:

"eyJ0ZWFtX2lkIjoiOWIzYTNi..."

Response

An array of readings and a next_cursor for the next page.

data
object[]
required
next_cursor
string | null

A bookmark for the next batch of readings. Send it back as ?cursor=... on your next call. null means you've got all the readings.