Devices
Manage IoT devices.List Devices
List devices. Users must provide
hardware_ids, admins can list all.Query Parameters
List of hardware IDs. Repeated (
?hardware_ids=id1&hardware_ids=id2) or comma-separated (?hardware_ids=id1%2Cid2%2Cid3). Required for users, optional
for admins.Get Device
Get a single device by
device_id or hardware_id.Get Device with Details
Get device with telemetry counts. Admin only 🔐
Update Device Name
Update device name. Set to
null to clear.Request Body
New device name, or
null to clearFull Device Update
Full device update. Admin only 🔐
Request Body
Device name
Device type identifier
Custom attributes
Delete Device
Delete a device. Admin only 🔐
Bulk Delete Devices
Delete multiple devices. Admin only 🔐
Request Body
Array of device IDs to delete
Device Config
Device config is the single declaration of a device’s active capabilities and operational parameters. Config is validated against the device type’s config schema (JSON Schema) on every write.Get Config
Get the device’s current config. Add
?schema=true to include the device type’s config schema and defaults.Query Parameters
When
true, includes the JSON Schema capability contract and default config for the device type.Replace Config
Replace the entire device config. The body is validated against the device type’s config schema. Invalid configs are rejected with
400 and structured error details.Patch Config
Merge partial updates into the device config. The merged result is validated against the config schema before persisting.
Reset Config
Reset the device config to the device type’s defaults.
Publish Config
Push the device’s saved config to the device over MQTT. Config save and config publish are separate operations — saving does not automatically push to the device.
Validation Errors
When a config write fails validation, the response includes structured error details:Capabilities
Device capabilities are derived from the device’s current config, not from telemetry. Each device type defines a config schema — the full superset of config options the type supports. A device instance’s active capabilities are the subset of that schema that is configured (enabled) in the device’s config. Capabilities are returned on device list and detail responses as acapabilities array of strings (e.g. ["gps", "lock", "battery", "wifi"]).
The config schema can be fetched via GET /devices/:id/config?schema=true for client-driven form generation.
Lock & Key/Keyless Capabilities
| Capability | Meaning |
|---|---|
lock | Device has lock hardware and accepts lock/unlock commands (used by system/geofence and, when allowed, by user) |
key_keyless | Device supports key vs keyless mode switching (two-relay, BLE mode 1). UI should show a key/keyless toggle |
- Show the key/keyless toggle only when
capabilitiesincludeskey_keyless. - Show the Lock/Unlock button only when
key_keylessis present andconfig.key_keyless_state === "keyless". - Devices with
lockbut withoutkey_keyless(e.g. BLE mode 2) have lock hardware for system/geofence use only — no manual Lock/Unlock in the UI.
key_keyless_state ("key" | "keyless" | "hybrid" | null)
"key"— Physical key only. User cannot lock/unlock remotely."keyless"— Remote lock/unlock only. No physical key."hybrid"— Physical key works and remote lock/unlock also allowed.null— Not applicable (device does not support key/keyless switching, e.g. BLE mode 2 or no BLE).
key_keyless capability is present and key_keyless_state is "keyless" or "hybrid".