/energyhistory/ IAMMETER-cloud API - groupby - Month and Year
Hi, it's possible to include in the energyhistory endpoint, in the groupby parameter, options of month and year?
this will help us to reduce the number of hits to the IAMETER-cloud.
Example:
https://www.iammeter.com/api/v1/site/energyhistory/{Place_ID}?Time=2025&groupby=month
Response: the 12 or the # of moths the meter has been active during that year
data": [
{
"time": "2025/1",
"yield": 0.6109,
"fromGrid": 0.0078,
"toGrid": 6.9065,
"specialLoad": 0,
"selfUse": 0
},
{
"time": "2025/2",
"yield": 0.732,
"fromGrid": 0.198,
"toGrid": 10.1235,
"specialLoad": 0,
"selfUse": 0
}, .... etc - all the moths of year 2025
and
https://www.iammeter.com/api/v1/site/energyhistory/{Place_ID}?groupby=year
Response: the # of years the meter has been active
data": [
{
"time": "2023",
"yield": 4.873,
"fromGrid": 23.635,
"toGrid": 2.354,
"specialLoad": 0,
"selfUse": 0
},
{
"time": "2024",
"yield": 35.2635,
"fromGrid": 123.5242,
"toGrid": 4765.9387,
"specialLoad": 0,
"selfUse": 0
}, .... etc - all the years the mester has been operating
Thanks in advance.
OK,we will add these monthly and yearly group paramter later
Hello,
Thank you for your valuable feedback. We have now implemented the new options for the groupby parameter in the energyhistory endpoint, allowing you to aggregate data by month or year. This enhancement should help reduce the number of hits to the IAMETER-cloud.
You can use this for online testing: https://www.iammeter.com/swaggerui/#/Place/get_api_v1_site_energyhistory__id_
Thank you!!!
That was fast!
works perfectly!
Just one question, does the startTime and EndTime parameters are "required" for groupby=year?
For the groupby=month requires endTime parameter?
Best regards,
Hi,
Regardless of the grouping option, both startTime and endTime parameters are required. This ensures maximum flexibility—allowing you to calculate aggregates for any specified time range, such as summing values for a particular period within a year.
BR
Thanks,
I appreciate very much your prompt response.
It works perfect!
Best regards,