Document the new /summary endpoint for sensors.
This commit is contained in:
parent
f0d8e9903d
commit
f03a090f58
|
@ -105,6 +105,32 @@ multiple requests should be made using the `offset` parameter. Setting `limit`
|
|||
to a value greater than the max will result in a response code of
|
||||
`422 Unprocessable Entity: exceeds max limit of 100000`.
|
||||
|
||||
**Data summary info**
|
||||
|
||||
It's also possible to retrieve summary information about the data stored for a
|
||||
particular sensor by adding `/summary` to the end of the sensor's URL. This will
|
||||
list each unique `name` used in the data, along with the total `count` of values
|
||||
and the `first` and `last` timestamp for each. For example:
|
||||
|
||||
`https://myfarm.farmos.net/farm/sensor/listener/xxxxxx/summary?private_key=yyyyyy`
|
||||
|
||||
Example JSON response:
|
||||
|
||||
```
|
||||
{
|
||||
"humid": {
|
||||
"count": 100,
|
||||
"first": "1541117473",
|
||||
"last": "1594911898"
|
||||
},
|
||||
"temp": {
|
||||
"count": 100,
|
||||
"first":"1541117473",
|
||||
"last":"1594911898"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Allowing public API read access**
|
||||
|
||||
Data in farmOS is private by default. A private key is required to push data to
|
||||
|
|
Loading…
Reference in New Issue