From 05579afdc2fd425b697b2ac77ba9e82eaaac9719 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 26 Jul 2025 23:16:34 +0200 Subject: doc: api: future: Introduce device info concept This reduces the HTTP endpoints and overhead. --- doc/api/future.md | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) (limited to 'doc/api') diff --git a/doc/api/future.md b/doc/api/future.md index 4cf0d40..7530704 100644 --- a/doc/api/future.md +++ b/doc/api/future.md @@ -22,15 +22,32 @@ accessed directly with its link-local address. # HTTP Server -- `GET /device/type` `text/plain` -- `GET /device/type/uuid` `text/plain` -- `GET /device/hardware/version` `text/plain` -- `GET /device/firmware/version` `text/plain` -- `GET /device/mac-address/eui-48` `text/plain` +- `GET /` `application/json` (returns device info, see below) - `GET /settings` `application/json` - `PUT /settings` `application/json` +# Device Info + +``` +{ + "hostname": "mydevice", + "type": { + "text": "iot-contact", + "uuid": "eeb58c52-8e25-489c-9a1a-c4662fc9318a" + }, + "version": { + "hardware": "v1.2.3", + "firmware": "v4.5.6" + }, + "address": { + "mac": { + "eui-48": "00:00:5e:00:53:01" + } + } +} +``` + # Settings ``` -- cgit v1.2.3-70-g09d2