sondahub

sondahub / Fleet API / Readings

Fake readings API

4,908 readings from the Fleet API, a fake IoT API. Telemetry. metrics is an object whose keys depend on the device type (a thermostat reports temperature, humidity and setpoint; a power meter voltage, current, power_kw and energy_kwh).

Reads with filters, sorting, search and relations; writes that answer like a real server and stay in your session token. Same ids on every build. Free, no key, CORS open.

Connect

List
https://api.sondahub.com/v1/fleet/readings
One record
https://api.sondahub.com/v1/fleet/readings/{id}
OpenAPI 3
https://api.sondahub.com/v1/fleet/openapi.json
GraphQL
https://api.sondahub.com/v1/fleet/graphql
JSON file
https://api.sondahub.com/data/fleet/readings.json
MCP
https://api.sondahub.com/mcp · list_records
The first three readings
curl "https://api.sondahub.com/v1/fleet/readings?limit=3"

Sample records

Records 1 to 3 of 4,908, exactly as GET /v1/fleet/readings/{id} answers them. The data file holds all of them.

[
  {
    "id": 1,
    "created_at": "2026-09-01T11:54:28Z",
    "updated_at": "2026-09-01T11:54:28Z",
    "device_id": 1,
    "recorded_at": "2026-09-01T11:54:28Z",
    "metrics": {
      "flow_lpm": 85.6,
      "pressure_bar": 4,
      "total_liters": 388793
    },
    "quality": "good"
  },
  {
    "id": 2,
    "created_at": "2026-09-01T11:54:59Z",
    "updated_at": "2026-09-01T11:54:59Z",
    "device_id": 1,
    "recorded_at": "2026-09-01T11:54:59Z",
    "metrics": {
      "flow_lpm": 90.1,
      "pressure_bar": 4.2,
      "total_liters": 388812
    },
    "quality": "good"
  },
  {
    "id": 3,
    "created_at": "2026-09-01T11:55:27Z",
    "updated_at": "2026-09-01T11:55:27Z",
    "device_id": 1,
    "recorded_at": "2026-09-01T11:55:27Z",
    "metrics": {
      "flow_lpm": 84.5,
      "pressure_bar": 4.2,
      "total_liters": 388842
    },
    "quality": "good"
  }
]

Fields

FieldTypeNotes
idread-onlyintAssigned by the server. Seed records keep their ids across restarts; records you create continue after the seed.
created_atread-onlydatetimeWhen the record was created (ISO 8601, UTC).
updated_atread-onlydatetimeWhen the record last changed.
device_idrequiredint → devices
recorded_atrequireddatetime
metricsrequiredjson { [metric]: number | boolean }
qualityenumgood estimated suspect

Relations: device → one device through device_id. Use ?expand=device to embed them, or the nested routes.

Endpoints

GET/v1/fleet/readingsA page, with every filter, sort, search, field and expand option.
POST/v1/fleet/readingsCreate one: 201 with the record, its id, a Location header and the session token that keeps it; 422 names each field that is wrong.
GET/v1/fleet/readings/{id}One record, with an ETag; If-None-Match earns a 304.
PATCH/v1/fleet/readings/{id}Change the fields you send.
PUT/v1/fleet/readings/{id}Replace the record; required fields must all be there.
DELETE/v1/fleet/readings/{id}Answers 200 with what was removed (a real server’s 204 lives at /v1/utils/status/204); gone for the session.
GET/v1/fleet/readings/{id}/deviceThe device this record points at.

Try it

List with a filter
curl "https://api.sondahub.com/v1/fleet/readings?quality=estimated&expand=device&limit=3"
One record
curl https://api.sondahub.com/v1/fleet/readings/1?expand=device
Create
curl -i -X POST https://api.sondahub.com/v1/fleet/readings \
  -H "Content-Type: application/json" \
  -d '{"device_id":1,"recorded_at":"2026-09-30T12:00:00Z","metrics":{},"quality":"good"}'
Read it back: newest first (send the session token)
curl "https://api.sondahub.com/v1/fleet/readings?sort=-id&limit=3" \
  -H "X-Sondahub-Session: THE_TOKEN_FROM_THE_CREATE"
Change one field
curl -X PATCH https://api.sondahub.com/v1/fleet/readings/1 \
  -H "Content-Type: application/json" \
  -d '{"quality":"estimated"}'
Delete the one you created
curl -X DELETE https://api.sondahub.com/v1/fleet/readings/4909 \
  -H "X-Sondahub-Session: THE_TOKEN_FROM_THE_CREATE"

Query recipes

Every list option works on readings; these are ready to paste. All the options.

WhatRequest
Page 2, 50 at a time (of 4,908)/v1/fleet/readings?page=2&limit=50
Only quality = good/v1/fleet/readings?quality=good
Newest first by created at/v1/fleet/readings?sort=-created_at&limit=5
Only some fields/v1/fleet/readings?fields=id,device_id&limit=5
Embed the device/v1/fleet/readings/1?expand=device
Just the count/v1/fleet/readings?limit=1&fields=id

GraphQL

The same readings as the readings query on https://api.sondahub.com/v1/fleet/graphql, and one reading as reading(id: 1). Introspection is on. More on the GraphQL API.

{
  readings(limit: 3, sort: "-id", filter: { quality: good }) {
    total
    data {
      id device_id recorded_at quality
      device { serial }
    }
  }
}
Run it
curl https://api.sondahub.com/v1/fleet/graphql -H "Content-Type: application/json" -d '{"query": "{ readings(limit: 3, sort: \"-id\", filter: { quality: good }) { total data { id device_id recorded_at quality device { serial } } } }"}'

From an AI agent (MCP)

The MCP server reaches the same rows with list_records, get_record, create_record, update_record and delete_record, and as the resource sondahub://fleet/readings.

tools/call
curl https://api.sondahub.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_records","arguments":{"api":"fleet","collection":"readings","filters":{"quality":"good"},"limit":3}}}'

More in the Fleet API

sites (40) · devices (500) · alerts (500) · commands (300)

The live streams, the MQTT broker, and the whole API on one page: Fleet API. Other worlds: fake e-commerce API, fake banking API, fake social media API, fake helpdesk API, fake flight booking API, fake user directory API.