Statistics (CSV)

Returns all the statistics for a device within the specified range of params utc_start and utc_end in CSV format. If those are not present will return the data for today from the hour 0 until the 7 days ago.

Relative times:

  • now - Current time
  • -XXs - Number of seconds before now
  • -XXm - Number of minutes before now
  • -XXh - Number of hours before now
  • -XXd - Number of days before now
  • -XXw - Number of weeks before now
  • -XXM - Number of months before now
  • -XXY - Number of months before now

Values for the statistics are presented each in its own column, alphabetically ordered and having statistic. as a prefix to their name (as column name).

The rows of the resulting csv will be ordered first by utc_time and then by device.id.

CSV response will include some extra columns like: device.id and device.name, a human readable time and zones tree path (we use -> between a prent zone name and a child zone name), here is an example:

Path Params
string
required
Query Params
string
Defaults to -1d

utc epoch timestamp as float, will return results after this time (inclusive). It will be always round to the hour so if you ask to -1h and is not in the exact minute 0, it will return the data from the past hour. If not present the default is the current day at hour 0. The limit you can request for it is 10 years in the past

string
Defaults to now

utc epoch time as float, will return results until this time (inclusive). If not present the default is the current hour. The limit you can ask for it is 1 day in the future

string
Defaults to ["active"]

JSON list of strings of the statistic names to filter the results. If not present will return all by default.

Responses

Language
Credentials
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json