Skip to content

Latest commit

 

History

History
65 lines (39 loc) · 1.5 KB

README.md

File metadata and controls

65 lines (39 loc) · 1.5 KB

labclimate

Database Table Description (Assuming Postgresql)

data table:

Field Name Field Type
node_id bigint
timestamp timestamp
temperature double
humidity double
air_qual double

nodes table:

Field Name Field Type
node_id bigint
node_location varchar(256)

API Endpoints

Method Endpoint Usage
GET /config Gets the client configuration from the server.
POST /data/{id} Submits climate data to the server.
POST /nodes Adds a new node to the server.
DELETE /nodes/{id} Deletes a node from the server.
PUT /nodes/{id} Updates the location of a node on the server.

GET /config response (JSON) *TODO*:

time_interval: {time_interval} (Time interval between submissions)

POST /data/{id} body (JSON):

node_id: {node id}

temperature: {temperature}

humididty: {humidity}

air_qual: {air quality value}

timestamp: {timestamp}

POST /nodes body (JSON):

node_id: {node id}

node_location: {location}

PUT /nodes/{id} body (JSON):

node_location: {location}