Batch Add Meter Readings
curl --request POST \
--url https://realtime.replace-me.example.com/meterreadings-collection:batchAdd \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"timestamp": "2020-01-02T14:00:00.000+0000",
"value": 10,
"meterId": 1
}
]
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([{timestamp: '2020-01-02T14:00:00.000+0000', value: 10, meterId: 1}])
};
fetch('https://realtime.replace-me.example.com/meterreadings-collection:batchAdd', 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-collection:batchAdd"
payload = [
{
"timestamp": "2020-01-02T14:00:00.000+0000",
"value": 10,
"meterId": 1
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)RealTime API - Meter Readings Batch Operations
Batch Add Meter Readings
POST
/
meterreadings-collection:batchAdd
Batch Add Meter Readings
curl --request POST \
--url https://realtime.replace-me.example.com/meterreadings-collection:batchAdd \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"timestamp": "2020-01-02T14:00:00.000+0000",
"value": 10,
"meterId": 1
}
]
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([{timestamp: '2020-01-02T14:00:00.000+0000', value: 10, meterId: 1}])
};
fetch('https://realtime.replace-me.example.com/meterreadings-collection:batchAdd', 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-collection:batchAdd"
payload = [
{
"timestamp": "2020-01-02T14:00:00.000+0000",
"value": 10,
"meterId": 1
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
