API Endpoint: aggregate_site_light_energy

API Endpoint: aggregate_site_light_energy

aggregate_site_light_energy

Returns the total energy used (in Watt-hours) by all of the light nodes in the site over the specified time period.

Similar to aggregate_site_interval_facts with interval=day and interval_type=1, but sums the total energy for the entire specified time span.
Parameters
Example Call
Example Response
Parameters
FieldTypeDescription
site_idstringUnique id of site
start_timeintegerStart time for report (Unix Epoch format)
end_timeintegerEnd time for report (Unix Epoch format)
Example Call
Return total energy used by site's lights from 18 June 2018 through 21 June 2018.

GET https://example-backend.siteworx.io/api/v1/aggregate_site_light_energy?site_id=486P8TBZpNE&start_time=1560830400&end_time=1561089600
Example Response
{
"total_energy": 17854.643605999976
}