You are viewing an old version of this page. View the current version.
Compare with Current View Page History
Version 1 Next »
Returns the consumption of energy on a specific switch that is active on a specific service location during a specified range of time. The call support different aggregation levels to obtain different levels of details.
https://app1pub.smappee.net/dev/v2/servicelocation/[SERVICELOCATIONID]/switch/[ID]/consumption
GET
Authorization: Bearer [ACCESS_TOKEN]
[ACCESS_TOKEN] being the access token received from the Get token or Refresh token authentication calls.
The level of detail and should be one of:
http://app1pub.smappee.net/dev/v2/servicelocation/123/switch/2/consumption?aggregation=1&from=1388534400000&to=1391212800000
{ "serviceLocationId": 123, "sensorId": 1, "records": [ { "timestamp": 1388534400000, "active": 9.0, "reactive": 0.0, }, ... ] }
This was introduced in version 2 of the API.