-
Notifications
You must be signed in to change notification settings - Fork 2
REST API
This route accepts two parameters. 'from' defines where the returned data is supposed to start and 'to' where it's supposed to end.
A call to this route is formated like this:
/api/data/get/?from=day-month-year&to=day-month-year
Example:
/api/data/get/?from=03-08-2004&to=23-01-2020
-
from, to
: See above -
width
: Width of the viewport of the requesting device (for calculating compression) -
amount
: May be used instead ofwidth
. Directly specifies how many datasets to get -
compressed
: To specify you want compressed datasets
Example:
/api/data/get/?from=03-08-2004&to=23-01-2020&width=2000&compressed
- Will result in roghly 250 values.
/api/data/get/?from=03-08-2004&to=23-01-2020&amount=250&compressed
- Will result in roughly 250 values.
This route allows the hardware to post the data to the server so that it can save it in the corresponding MySQL database.
-
token
: Value defined as 'insert_token' in config.py -
t
: The temperature -
w
: The weight -
h
: The humidity
In the case of multiple scales being attached to the system, this endpoint can be used to send data from other scales. The row in the database that contains the data for this measurement will be updated accordingly. In case the main data for this measurement (temp, weight of scale 1 and humidity) isn't in yet and there is no row, the system takes care of this automatically.
-
token
: Value defined as 'insert_token' in config.py -
w
: The weight this scale has determined -
n
: The number/id/name of the scale (a column with the name of this value has to exist otherwise the data won't be accepted)
BeeLogger-rewrite © Programmier-AG 2020-2022 Do not redistribute
All rights reserved