diff --git a/docs/guide/assets/sensors.md b/docs/guide/assets/sensors.md index 7e40ccf3b..6d92e564c 100644 --- a/docs/guide/assets/sensors.md +++ b/docs/guide/assets/sensors.md @@ -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