Aggregate Readings By Commodities
curl --request POST \
--url https://realtime.replace-me.example.com/meterreadings/summary/commodity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"meterIds": [
"1"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({meterIds: ['1']})
};
fetch('https://realtime.replace-me.example.com/meterreadings/summary/commodity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://realtime.replace-me.example.com/meterreadings/summary/commodity"
payload = { "meterIds": ["1"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)RealTime API - Meter Readings Aggregations
Aggregate Readings By Commodities
A POST request will sum meter reading data by commodities into aggregation intervals.
The supported aggregation intervals are
- Day
- Week
- Month
- Prior year
Request Body Structure
| Path | Type | Description |
|---|---|---|
meterIds | Array | The meter IDs of the custom meters. |
Response Body Structure
| Path | Type | Description |
|---|---|---|
day | Array | Meter Readings aggregated for the past 24 hours. |
week | Array | Meter Readings aggregated for the past 1 week. |
month | Array | Meter Readings aggregated for the past 24 hours. |
lastYear | Array | Meter Readings aggregated for the past 1 year. |
POST
/
meterreadings
/
summary
/
commodity
Aggregate Readings By Commodities
curl --request POST \
--url https://realtime.replace-me.example.com/meterreadings/summary/commodity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"meterIds": [
"1"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({meterIds: ['1']})
};
fetch('https://realtime.replace-me.example.com/meterreadings/summary/commodity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://realtime.replace-me.example.com/meterreadings/summary/commodity"
payload = { "meterIds": ["1"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
