Developer API Reference

Get a Location's water usage

Retrieve location water usage

GET /v1/locations/{locationId}/readings/water-usage

Query Params

startTime string | number required
Time at which the you want the readings from. This should be an ISO 8601 standard date format or an epoc timestamp(seconds)
endTime string | number
Time at which the you want the readings till. This should be an ISO 8601 standard date format or an epoc timestamp(seconds). The default value is the current date time (now)
groupBy string
The period you want the readings grouped by. Accepted values are `hour`, `day`, `month` or `year`. Default is `hour`
page number
Results page to return
perPage number
Number of readings to return per page . see limits

Response Body

A successful request returns the HTTP 200 OK status code and a JSON response body that shows the location's water usage.

page number
Current page of the returned readings
perPage number
Number of readings returned per page
pageCount string
Number of pages available
total number
Total number of readings
readings array
A list of all the readings
GET /v1/locations/{locationId}/readings/water-usage HTTP/1.1
    ?startTime={}
    &[endTime={now}]
    &[groupBy=hour]
    &[page=1]
Content-Type: application/json
Authorization: Bearer {}
{
  "page": 1,
  "perPage": 10,
  "pageCount": 1,
  "total": 3,
  "readings": [{
    "time": "2018-11-19T10:00:00-05:00",
    "volume": 45.987
  },
  {
    "time": "2018-11-19T11:00:00-05:00",
    "volume": 22.8765
  },
  {
    "time": "2018-11-19T12:00:00-05:00",
    "volume": 0
  }],
  "units": "gallons"
}