get last

get
/last/n

http://localhost:8000/ts/:id/last/:n/filter/:name/:compare/:value/:aggegrate
This endpoint allows you to get the last n values from the time series.
Request
Response
Request
Path Parameters
id
required
string
id of time series (can contain comma separated list of ids)
n
required
number
number of values to return
name
optional
string
tag name (can contain comma separated list of names)
compare
optional
string
equality function (equals or contains)
value
optional
string
tag value (can contain comma separated list of values)
aggregate
optional
string
aggregation function (can contain count, sum, min, max, mean, median or sd)
Response
200: OK
JSON response
[
{
"timestamp": 1599071502857448,
"tag": [
{
"serial": "A001"
}
],
"value": 43
},
{
"timestamp": 1599071489475885,
"value": 42
}
]
Examples
Examples
curl http://localhost:8000/ts/sensor1,sensor2/last/1
curl http://localhost:8000/ts/sensor1/last/2