Skip to content

API reference

This is the device-facing API — the endpoints your hardware calls. The base URL is https://api.hiveron.net. Everything an operator does (creating accounts, device types, devices, firmware, and roll-outs) is done in the console UI, so it isn't listed here.

The Auth column shows what a request needs: None (public) or Device (a device-signed token — see Device integration).

Clock

MethodPathAuthDescription
GET/timeNone→ { unix_ms }. The trusted clock a device uses to timestamp its token.

Device endpoints (/iot)

MethodPathAuthDescription
GET/iot/fw_checkDevice→ { fw_id } (-1 if none assigned). Poll to detect an OTA update.
GET/iot/fw_downloadDeviceStreams the assigned firmware binary (404 if none).
POST/iot/telemetryDevice{ content } → 204. Report a reading (content is a free-form string).
GET/iot/command_checkDevice→ { count } of pending commands.
GET/iot/commandDevice→ { id, content } of the oldest pending command, or 204 (peek, non-consuming).
GET/iot/commandsDevice→ { commands[] } (peek all pending).
POST/iot/command_ackDevice{ id } → 204. Removes the command from the queue (404 if already acked).

Authentication

A device sends a bearer token it signs itself — there is no login step and no stored session. The GET /time endpoint is public and needs no token.

# Every /iot request carries a device-signed token:
Authorization: Bearer <device-token>

# where <device-token> = base64( dev_id ‖ unix_ms ‖ ECDSA-P256 signature )