Fake alerts API
500 alerts from the Fleet API, a fake IoT API. Something a device or a site needs looked at. Acknowledge one with PATCH {"status":"acknowledged"}.
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/alerts
- One record
- https://api.sondahub.com/v1/fleet/alerts/{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/alerts.json
- MCP
- https://api.sondahub.com/mcp · list_records
curl "https://api.sondahub.com/v1/fleet/alerts?limit=3"
Sample records
Records 1 to 3 of 500, exactly as GET /v1/fleet/alerts/{id} answers them. The data file holds all of them.
[
{
"id": 1,
"created_at": "2026-08-22T23:54:11Z",
"updated_at": "2026-08-23T09:38:11Z",
"device_id": 255,
"site_id": 28,
"severity": "warning",
"kind": "offline",
"message": "VB2-6C9QCZ has not reported for 150 minutes",
"status": "resolved",
"opened_at": "2026-08-22T23:54:11Z",
"acknowledged_at": "2026-08-23T00:26:11Z",
"resolved_at": "2026-08-23T09:38:11Z",
"acknowledged_by": "[email protected]"
},
{
"id": 2,
"created_at": "2026-08-17T00:16:38Z",
"updated_at": "2026-08-17T16:04:38Z",
"device_id": 387,
"site_id": 24,
"severity": "warning",
"kind": "offline",
"message": "GW10-UCRF9E has not reported for 96 minutes",
"status": "resolved",
"opened_at": "2026-08-17T00:16:38Z",
"acknowledged_at": "2026-08-17T04:14:38Z",
"resolved_at": "2026-08-17T16:04:38Z",
"acknowledged_by": "[email protected]"
},
{
"id": 3,
"created_at": "2026-08-13T06:19:20Z",
"updated_at": "2026-08-14T05:26:20Z",
"device_id": 337,
"site_id": 18,
"severity": "critical",
"kind": "tamper",
"message": "TH200-JZHZAT enclosure opened",
"status": "resolved",
"opened_at": "2026-08-13T06:19:20Z",
"acknowledged_at": "2026-08-13T06:38:20Z",
"resolved_at": "2026-08-14T05:26:20Z",
"acknowledged_by": "[email protected]"
}
]
Fields
| Field | Type | Notes |
|---|---|---|
idread-only | int | Assigned by the server. Seed records keep their ids across restarts; records you create continue after the seed. |
created_atread-only | datetime | When the record was created (ISO 8601, UTC). |
updated_atread-only | datetime | When the record last changed. |
device_idrequired | int → devices | |
site_id | int → sites | |
severityrequired | enum | info warning critical |
kindrequired | enum | offline low_battery threshold tamper firmware weak_signal |
message | string | |
status | enum | open acknowledged resolved muted |
opened_at | datetime | |
acknowledged_at | datetime | |
resolved_at | datetime | |
acknowledged_by | string |
Relations: device → one device through device_id; site → one site through site_id. Use ?expand=device,site to embed them, or the nested routes.
Endpoints
acknowledged or resolved stamps the matching timestamp.Try it
curl "https://api.sondahub.com/v1/fleet/alerts?severity=warning&expand=device&limit=3"
curl https://api.sondahub.com/v1/fleet/alerts/1?expand=device
curl -i -X POST https://api.sondahub.com/v1/fleet/alerts \
-H "Content-Type: application/json" \
-d '{"device_id":1,"severity":"info","kind":"offline","status":"open"}'
curl "https://api.sondahub.com/v1/fleet/alerts?sort=-id&limit=3" \ -H "X-Sondahub-Session: THE_TOKEN_FROM_THE_CREATE"
curl -X PATCH https://api.sondahub.com/v1/fleet/alerts/1 \
-H "Content-Type: application/json" \
-d '{"severity":"warning"}'
curl -X DELETE https://api.sondahub.com/v1/fleet/alerts/501 \ -H "X-Sondahub-Session: THE_TOKEN_FROM_THE_CREATE"
Query recipes
Every list option works on alerts; these are ready to paste. All the options.
| What | Request |
|---|---|
| Page 2, 50 at a time (of 500) | /v1/fleet/alerts?page=2&limit=50 |
| Only severity = info | /v1/fleet/alerts?severity=info |
| Newest first by created at | /v1/fleet/alerts?sort=-created_at&limit=5 |
| Message contains “vb2” | /v1/fleet/alerts?message_like=vb2 |
| Full-text search | /v1/fleet/alerts?q=vb2 |
| Only some fields | /v1/fleet/alerts?fields=id,message&limit=5 |
| Embed the device | /v1/fleet/alerts/1?expand=device |
| Just the count | /v1/fleet/alerts?limit=1&fields=id |
GraphQL
The same alerts as the alerts query on https://api.sondahub.com/v1/fleet/graphql, and one alert as alert(id: 1). Introspection is on. More on the GraphQL API.
{
alerts(limit: 3, sort: "-id", filter: { severity: info }) {
total
data {
id device_id site_id severity
device { serial }
}
}
}
curl https://api.sondahub.com/v1/fleet/graphql -H "Content-Type: application/json" -d '{"query": "{ alerts(limit: 3, sort: \"-id\", filter: { severity: info }) { total data { id device_id site_id severity 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/alerts.
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":"alerts","filters":{"severity":"info"},"limit":3}}}'
More in the Fleet API
sites (40) · devices (500) · readings (4,908) · 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.