curl --request GET \
--url https://api.home.datanumia.com/api/v1/sites/{site-id}/consumptions-self-comparisonimport requests
url = "https://api.home.datanumia.com/api/v1/sites/{site-id}/consumptions-self-comparison"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v1/sites/{site-id}/consumptions-self-comparison', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.home.datanumia.com/api/v1/sites/{site-id}/consumptions-self-comparison",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.home.datanumia.com/api/v1/sites/{site-id}/consumptions-self-comparison"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.home.datanumia.com/api/v1/sites/{site-id}/consumptions-self-comparison")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v1/sites/{site-id}/consumptions-self-comparison")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"units": {
"cost": "EUR",
"energyMeter": "KWH"
},
"comparisons": [
{
"selectedPeriod": {
"period": {
"startTime": "2024-01-01T00:00:00+01:00",
"endTime": "2024-01-31T00:00:00+01:00"
},
"cost": {
"total": 285.6546
},
"energyMeter": {
"total": 1613.622
},
"errorFlags": [
"ABERRANT_CONSUMPTION",
"BAD_INDEX_INFORMATION_OR_CONTRACT_CHANGE_MISSING"
]
},
"referencePeriod": {
"period": {
"startTime": "2024-01-01T00:00:00+01:00",
"endTime": "2024-01-31T00:00:00+01:00"
},
"cost": {
"total": 285.6546
},
"energyMeter": {
"total": 1613.622
},
"errorFlags": [
"ABERRANT_CONSUMPTION",
"BAD_INDEX_INFORMATION_OR_CONTRACT_CHANGE_MISSING"
]
},
"weatherImpactMessageCode": "COLDER_WEATHER_HIGHER_CONSO",
"differenceRate": {
"cost": {
"total": 285.6546
},
"energyMeter": {
"total": 1613.622
}
}
}
]
}{
"type": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"instance": "<string>",
"properties": {}
}This response has no body data.{
"type": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"instance": "<string>",
"properties": {}
}This response has no body data.Comparison of consumptions between two periods.
This API is used to get consumption comparisons between two periods : selected period and reference period. Selected period is the period that needs to be compared. Reference period is the period to which the selected period is compared to.
curl --request GET \
--url https://api.home.datanumia.com/api/v1/sites/{site-id}/consumptions-self-comparisonimport requests
url = "https://api.home.datanumia.com/api/v1/sites/{site-id}/consumptions-self-comparison"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v1/sites/{site-id}/consumptions-self-comparison', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.home.datanumia.com/api/v1/sites/{site-id}/consumptions-self-comparison",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.home.datanumia.com/api/v1/sites/{site-id}/consumptions-self-comparison"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.home.datanumia.com/api/v1/sites/{site-id}/consumptions-self-comparison")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v1/sites/{site-id}/consumptions-self-comparison")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"units": {
"cost": "EUR",
"energyMeter": "KWH"
},
"comparisons": [
{
"selectedPeriod": {
"period": {
"startTime": "2024-01-01T00:00:00+01:00",
"endTime": "2024-01-31T00:00:00+01:00"
},
"cost": {
"total": 285.6546
},
"energyMeter": {
"total": 1613.622
},
"errorFlags": [
"ABERRANT_CONSUMPTION",
"BAD_INDEX_INFORMATION_OR_CONTRACT_CHANGE_MISSING"
]
},
"referencePeriod": {
"period": {
"startTime": "2024-01-01T00:00:00+01:00",
"endTime": "2024-01-31T00:00:00+01:00"
},
"cost": {
"total": 285.6546
},
"energyMeter": {
"total": 1613.622
},
"errorFlags": [
"ABERRANT_CONSUMPTION",
"BAD_INDEX_INFORMATION_OR_CONTRACT_CHANGE_MISSING"
]
},
"weatherImpactMessageCode": "COLDER_WEATHER_HIGHER_CONSO",
"differenceRate": {
"cost": {
"total": 285.6546
},
"energyMeter": {
"total": 1613.622
}
}
}
]
}{
"type": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"instance": "<string>",
"properties": {}
}This response has no body data.{
"type": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"instance": "<string>",
"properties": {}
}This response has no body data.Path Parameters
Site identifier
Query Parameters
Energy type.
ELEC Represents the strategy used for the comparison. Two options are available : SHORTEST_DAY_MONTH, SAME_DAYS. SHORTEST_DAY_MONTH is used to truncate the longest period with the length of the shortest one. SAME_DAYS is used to compared same days and months between to period.
SHORTEST_PERIOD_LENGTH, SAME_DAYS_MONTH Represents selected period begin date (yyyy-MM-dd'T'HH:mm:ss'Z or yyyy-MM-dd'T'HH:mm:ss.SSS'Z)
Represents selected period end date (yyyy-MM-dd'T'HH:mm:ss'Z or yyyy-MM-dd'T'HH:mm:ss.SSS'Z)
Represents the reference period begin date (yyyy-MM-dd'T'HH:mm:ss'Z or yyyy-MM-dd'T'HH:mm:ss.SSS'Z)
Represents the reference period end date (yyyy-MM-dd'T'HH:mm:ss'Z or yyyy-MM-dd'T'HH:mm:ss.SSS'Z)