Open nrozanov opened 1 week ago
Added sensors//stats api endpoint
You should start getting smth like this when requesting http://localhost:5000/api/v3_0/sensors/{sensor_id}/stats { "max_event_start": "Thu, 27 Jun 2024 21:00:00 GMT", "max_value": 18.0, "mean_value": 10.104166666666666, "min_event_start": "Thu, 04 Apr 2024 22:00:00 GMT", "min_value": 4.0, "status": 200, "sum_values": 2425.0 }
{ "max_event_start": "Thu, 27 Jun 2024 21:00:00 GMT", "max_value": 18.0, "mean_value": 10.104166666666666, "min_event_start": "Thu, 04 Apr 2024 22:00:00 GMT", "min_value": 4.0, "status": 200, "sum_values": 2425.0 }
Go to stats page for some sensor, check you get response like from above
-
I believe we could add the number of values as well?
Description
Added sensors//stats api endpoint
Look & Feel
You should start getting smth like this when requesting http://localhost:5000/api/v3_0/sensors/{sensor_id}/stats
{ "max_event_start": "Thu, 27 Jun 2024 21:00:00 GMT", "max_value": 18.0, "mean_value": 10.104166666666666, "min_event_start": "Thu, 04 Apr 2024 22:00:00 GMT", "min_value": 4.0, "status": 200, "sum_values": 2425.0 }
How to test
Go to stats page for some sensor, check you get response like from above
Further Improvements
-
Related Items
-