Time series data
Time series data are available for translated iotnodes. When a translated iotnode updates, Yggio saves numerical data into a time series database.
Using the REST API you can get time-series-data of a specific attribute from an iotnode.
The following is the format of time series data for an attribute of an iotnode:
[
{
"time": String,
"value": Number
},
...
]
time
is a ISO 8601 timestamp. E.g.: 2019-08-07T12:30:00.00Z.
value
is the saved value.
Set time interval
One can choose to get the data with a set time between each data point. This might be desirable if a high data resolution is not needed. It can improve loading times and performance. The database then uses interpolation to set the values for the data points.
If a set time interval is used the data will have the following format:
[
{
"time": String,
"value": Number,
"min": Number,
"max": Number,
"stddev": Number
},
...
]
time
is a ISO 8601 timestamp. E.g.: 2019-08-07T12:30:00.00Z.
value
is the interpolated value.
min
is the value of the smallest point in the interpolated area.
max
is the value of the largest point in the interpolated area.
stddev
is the standard deviation of the points in the interpolation area.