Reports
Get Data Usage Report
Name
Type
Description
curl -X GET "https://resi-api.iproyal.com/v1/residential/data-usage-report?hash=asd48w4f5c1s2a5w4f8h5t6r1v&date_from=2026-01-01&date_to=2026-01-31&measurement_unit=GB&rounding_decimal=2" \
-H "Authorization: Bearer <your_api_token>" \
-o data-usage-report.csv<?php
$query = http_build_query([
'hash' => 'asd48w4f5c1s2a5w4f8h5t6r1v',
'date_from' => '2026-01-01',
'date_to' => '2026-01-31',
'measurement_unit' => 'GB',
'rounding_decimal' => 2,
]);
$ch = curl_init("https://resi-api.iproyal.com/v1/residential/data-usage-report?{$query}");
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer <your_api_token>']);
curl_setopt($ch, CURLOPT_FILE, fopen('data-usage-report.csv', 'w'));
curl_exec($ch);
curl_close($ch);import requests
params = {
"hash": "asd48w4f5c1s2a5w4f8h5t6r1v",
"date_from": "2026-01-01",
"date_to": "2026-01-31",
"measurement_unit": "GB",
"rounding_decimal": 2,
}
headers = {"Authorization": "Bearer <your_api_token>"}
response = requests.get(
"https://resi-api.iproyal.com/v1/residential/data-usage-report",
params=params,
headers=headers,
stream=True,
)
with open("data-usage-report.csv", "wb") as f:
for chunk in response.iter_content(chunk_size=8192):
f.write(chunk)Last updated
Was this helpful?