Enhance REST API to return last x days of watering details
Gathering FeedbackCurrently, the REST API can return the watering logs for a specified date going forward a specified number of days.
For example, this will get the watering details for 30 days starting Jan 1st 2019
GET watering/log/details/2019-01-01/30
It would be helpful to allow the API to assume the current date/time and just return the previous x number of days of history.
So a call like this or something similar would get the last 7 days of history as of the calling date/time:
GET watering/log/details/-7
This would help as I am pulling data into a cloud based reporting tool that can not dynamically modify the calling URL. So with the example above, the URL could remain constant and the API would be able to always return a rolling 7 day history.
Please sign in to leave a comment.
Comments
2 comments