Devices API
Endpoints
Section titled “Endpoints”| Method | Path | Description |
|---|---|---|
GET | /api/devices | List devices |
POST | /api/devices | Register a device |
GET | /api/devices/:id | Get device details |
PATCH | /api/devices/:id | Update device |
DELETE | /api/devices/:id | Remove device |
POST | /api/devices/:id/commands | Send command to device |
List Devices
Section titled “List Devices”GET /api/devices?page=1&limit=50&status=onlineQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
page | int | 1 | Page number |
limit | int | 50 | Items per page (max 1000) |
status | string | all | Filter: online, offline, error |
search | string | — | Search by name or device ID |
tags | string | — | Filter by tag (key:value) |
Response
Section titled “Response”{ "data": [ { "id": "550e8400-...", "deviceId": "RC500-A1B2C3", "name": "Site Alpha Router", "status": "online", "firmwareVersion": "1.52.1", "lastSeenAt": "2026-05-24T10:30:00Z", "tags": { "region": "us-west" } } ], "pagination": { "page": 1, "limit": 50, "total": 127, "totalPages": 3 }}Get Device
Section titled “Get Device”GET /api/devices/:idReturns full device details including latest telemetry metrics (signal strength, GPS position, system stats).
Register Device
Section titled “Register Device”POST /api/devicesContent-Type: application/json
{ "deviceId": "RC500-NEW123", "name": "New Router", "tags": { "region": "eu-central" }}Update Device
Section titled “Update Device”PATCH /api/devices/:idContent-Type: application/json
{ "name": "Updated Name", "tags": { "region": "us-east" }}Send Command
Section titled “Send Command”POST /api/devices/:id/commandsContent-Type: application/json
{ "command": "reboot"}Available Commands
Section titled “Available Commands”| Command | Description |
|---|---|
reboot | Restart device |
config_sync | Force configuration sync |
factory_reset | Reset to factory defaults |
firmware_update | Deploy firmware (requires url and hash params) |
Error Responses
Section titled “Error Responses”| Status | Meaning |
|---|---|
| 400 | Invalid request |
| 401 | Not authenticated |
| 403 | Insufficient permissions |
| 404 | Device not found |
| 429 | Rate limit exceeded |