Energy Statistics
The energy-statistics endpoints aggregate raw event data into time-bucketed readings for a specific building. Three temporal resolutions are available: hourly, daily, and monthly.
Hourly Energy Statistics
Returns energy data aggregated on an hourly basis. Use this for intraday charts (e.g. "Today's energy").
Get energy related data of a building, aggregated on a hourly basis.
^[a-zA-Z0-9:._-]{1,100}$The starting date of the time window for selecting event data.
Remark: The building's local time zone is taken into account.
2024-01-01Pattern: [0-9]{4}-[0-9]{2}-[0-9]{2}The final date of the time window for selecting event data.
Remark: the time window can be up to 1 year.
2024-01-31Pattern: [0-9]{4}-[0-9]{2}-[0-9]{2}OK
GET /buildings/{customerBuildingId}/energy-statistics/hourly/v1?eventTypes=ENERGY_GENERATION&from=text&to=text HTTP/1.1
Host: api.moost.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
[
{
"startTimestamp": 1,
"energyGeneration": 1,
"energyConsumption": 1,
"gridEnergyConsumption": 1
}
]Daily Energy Statistics
Returns energy data aggregated on a daily basis. Use this for "this month" charts and seasonal analysis.
Get energy related data of a building, aggregated on a daily basis.
^[a-zA-Z0-9:._-]{1,100}$The starting date of the time window for selecting event data.
Remark: The building's local time zone is taken into account.
2024-01-01Pattern: [0-9]{4}-[0-9]{2}-[0-9]{2}The final date of the time window for selecting event data.
Remark: the time window can be up to 1 year.
2024-01-31Pattern: [0-9]{4}-[0-9]{2}-[0-9]{2}OK
GET /buildings/{customerBuildingId}/energy-statistics/daily/v1?eventTypes=ENERGY_GENERATION_YESTERDAY&from=text&to=text HTTP/1.1
Host: api.moost.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
[
{
"day": "text",
"energyGeneration": 1,
"energyConsumption": 1,
"gridEnergyConsumption": 1,
"energyBaseConsumption": 1,
"gridEnergyBaseConsumption": 1
}
]Prefer the *_YESTERDAY event types (daily resolution data) over high-resolution types — they are significantly faster to query. If both low and high resolution types are declared, the API tries daily resolution first and falls back to high resolution only if no data is found.
Monthly Energy Statistics
Returns energy data aggregated on a monthly basis. Use this for yearly overview charts and 12-month trend cards.
Get energy related data of a building, aggregated on a monthly basis.
^[a-zA-Z0-9:._-]{1,100}$The starting month of the time window for selecting event data.
Remark: The building's local time zone is taken into account.
2024-01Pattern: [0-9]{4}-[0-9]{2}The final month of the time window for selecting event data.
Remark: the time window can be up to 1 year.
2024-12Pattern: [0-9]{4}-[0-9]{2}OK
GET /buildings/{customerBuildingId}/energy-statistics/monthly/v1?eventTypes=ENERGY_GENERATION_YESTERDAY&from=text&to=text HTTP/1.1
Host: api.moost.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
OK
[
{
"month": "text",
"energyGeneration": 1,
"energyConsumption": 1,
"gridEnergyConsumption": 1
}
]Last updated

