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
}
 
    • Related Articles

    • API Terms

      Overview This article provides definitions of terms that are critical to understand when using the SiteWorx API. Terms ID All resources in SiteWorx are identified by a unique ID. They are represented as alpha-numeric strings (e.g. 3EVHgjWw46E.) ...
    • API Endpoint: aggregate_site_interval_facts

      aggregate_site_interval_facts Returns an array of interval facts for a site over a given span of time. Parameters Example Call (Energy Usage) Example Response (Energy Usage) Example Call (Occupancy) Example Response (Occupancy) Parameters Field Type ...
    • API Endpoint: site_list

      site_list Returns an array of site_info structs with information about each Site in your Organization. Further information can be found in the API Endpoint: site_info article.
    • API Endpoint: aggregate_sensor_data

      aggregate_sensor_data Returns sensor data aggregated over time for a given data_source or sensor. The aggregate_sensor_data endpoint can be used to retrieve data from power meters and environmental sensors in SiteWorx Sense. Parameters Example Call ...
    • API Endpoint: site_info

      site_info Returns information about a Site in your Organization. Variables Parameters Example Call Example Response Variables Field Type Description id string Unique database id for this site name string Site name address string Site address ...