From e690a2ad27ae5937c9a470c7292acf8ca5935765 Mon Sep 17 00:00:00 2001 From: cat6e <63829136+catSIXe@users.noreply.github.com> Date: Tue, 30 Mar 2021 12:04:02 +0200 Subject: [PATCH] Update README.md --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/README.md b/README.md index f891c97..c9487cb 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ Planned: + + API Server running on Port `3000` API Calls: @@ -24,6 +26,51 @@ API Calls: | GET `/api/message/status/` - fetches the current Message Data(DeliveryLog, Payload, etc.) +| GET `/api/device/:` - Lists all Device IDs + +| GET `/api/device/:` - Returns the Device State. + +Example: +> /api/device/birdyslim:test333 +```json +{ + "lastSeen": "2021-03-30T10:01:24.988Z", + "rssi": 34, + "lastLoRaPacket": { + "end_device_ids": { + "device_id": "test333", + "application_ids": { + "application_id": "birdy-slim-iot" + } + }, + "correlation_ids": [ ... ], + "received_at": "2021-03-30T10:01:24.988088037Z", + "uplink_message": { + "f_port": 5, + "frm_payload": "AB4z1wBKLDEQ", + "decoded_payload": { + "lastGPSAcquisition": 16, + "latitude": 19.79351, + "longitude": 48.60977, + "type": "gps" + }, + "settings": { + "data_rate": {} + }, + "received_at": "0001-01-01T00:00:00Z" + }, + "simulated": true + }, + "gps": { + "gps": { + "lastGPSAcquisition": 16, + "latitude": 19.79351, + "longitude": 48.60977 + } + } +} +``` + | POST `/api/message/advanced` - Creates a new Message and starts delivering it, returns the Message ID. HTTP Body is a JSON Object. for example: ```json {