Previous Example

Example 13: Retrieving a historical runtime report

Note on token authentication:

If you have completed the authentication process from Example 1, your access token will be pre-populated in all requests throughout every example.

To specify a different access token, please paste it in the form below and press 'Update'. Alternatively, you can go back to the first example here to re-authenticate. Doing either will save your access token for all future examples.

Access Token:

In this example, we will demonstrate how to obtain historical runtime data from the thermostat. This is accomplished through the GET Runtime Report request.

We will retrieve the heat, cool, and fan run durations, along with the outdoor temperature, and the indoor average temperature between 2015-01-01 to 2015-01-03. Note that the date and time stamp of the requests are in UTC time. Remember to replace the thermostat identifier below with your actual thermostat identifier.

curl -s --request GET -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Bearer ACCESS_TOKEN" '\{"startDate":"2015-01-01","endDate":"2015-01-03","columns":"auxHeat1,compCool1,fan,outdoorTemp,zoneAveTemp","selection":\{"selectionType":"thermostats","selectionMatch":"318324702718"\}\}'

The results are tabulated in the rowList property. The property is an array, with each element within the array representing the fetched metrics for a 5 seconds time slot. For each time slot, a comma separated values string denotes the date and time of the time slot followed by the requested metrics.

Note that request date and time are in UTC while the response date and time are in thermostat time.

  "columns": "auxHeat1,compCool1,fan,outdoorTemp,zoneAveTemp",
  "reportList": [
      "thermostatIdentifier": "318324702718",
      "rowCount": 863,
      "rowList": [
  "sensorList": [],
  "startDate": "2015-01-01",
  "endDate": "2015-01-03",
  "status": {
    "code": 0,
    "message": ""

For exmple, the row:


Represents the time slot at 7:55pm on December 31, 2014 thermostat time. The heating and fan was on for 30 seconds within this 5 minutes time slot. The outside temperature was 17.6℉ and the average indoor temperature was 69.4℉.

Congratulations, you have now reached the end of all the examples. Feel free to run any of our Sample Apps or visit our API Documentation pages to gain further knowledge.

Previous Example