From bf996b713c0fd7f2646a1714998269b7285425b9 Mon Sep 17 00:00:00 2001 From: chabisik Date: Fri, 11 Dec 2020 16:08:19 +0100 Subject: [PATCH] mise a jour --- Dockerfiles/API.txt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Dockerfiles/API.txt diff --git a/Dockerfiles/API.txt b/Dockerfiles/API.txt new file mode 100644 index 0000000..d591f55 --- /dev/null +++ b/Dockerfiles/API.txt @@ -0,0 +1,34 @@ +SERVER +GET /devices +GET /device/:dev +POST /device/:dev/data +GET /device/:dev/data +POST /devices/register +GET /gateways +GET /gateways/:gw +POST /gateways/register +GET /ping +GET /health + +GATEWAY (Intermediary & Final) +POST /gateways/register +POST /devices/register +POST /device/:dev/data +GET /gateways +GET /gateway/:gw +GET /ping +GET /health + +DEVICE +--- + +Data Format +{ Name : LOCAL_ENDPOINT.NAME, + Data : dataItem++, //an integer incrementing everytime data is sent + Time : Date.now(), //the date (+hour) the data has been sent +} + +Register Format +{ Name : LOCAL_ENDPOINT.NAME, //the name of the entity which want to register itself + PoC : 'http://' + LOCAL_ENDPOINT.IP + ':' + LOCAL_ENDPOINT.PORT, //the address from which the registering entity can be joined +}