get first

get
/first/n

http://localhost:8000/ts/:id/first/:n/filter/:name/:compare/:value/:aggegrate
This endpoint allows you to get the first n values from a time series.
Request
Response
Request
Path Parameters
id
optional
string
id of time series (can contain comma separated list of ids)
n
optional
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
aggregate function (can contain count, sum, min, max, mean, median or sd)
Response
200: OK
JSON response
[
{
"timestamp": 1599071489475885,
"value": 42
},
{
"timestamp": 1599071502857448,
"tag": [
{
"serial": "A001"
}
],
"value": 43
}
]
Examples
Examples
curl http://localhost:8000/ts/sensor1/first/2
curl http://localhost:8000/ts/sensor1,sensor2/first/1