curl --request GET \
--url https://api.home.datanumia.com/api/v1/sites/{site-id}/monthly-comparisonsimport requests
url = "https://api.home.datanumia.com/api/v1/sites/{site-id}/monthly-comparisons"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v1/sites/{site-id}/monthly-comparisons', 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}/monthly-comparisons",
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}/monthly-comparisons"
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}/monthly-comparisons")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v1/sites/{site-id}/monthly-comparisons")
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[
{
"month": 123,
"currentYearMonthConsumption": {
"energy": 123,
"totalCost": 123
},
"previousYearMonthConsumption": {
"energy": 123,
"totalCost": 123
},
"beginMonthDay": "<string>",
"endMonthDay": "<string>",
"isFullMonth": true,
"energyDifferenceRate": 123,
"totalCostDifferenceRate": 123
}
]{
"errorCode": "<string>",
"errorDescription": "<string>"
}This response has no body data.This response has no body data.This response has no body data.Get sites monthly comparisons
get the monthly gas energies comparison between the months of the current year (given as paramter βyearβ) and the months of the previous year
curl --request GET \
--url https://api.home.datanumia.com/api/v1/sites/{site-id}/monthly-comparisonsimport requests
url = "https://api.home.datanumia.com/api/v1/sites/{site-id}/monthly-comparisons"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v1/sites/{site-id}/monthly-comparisons', 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}/monthly-comparisons",
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}/monthly-comparisons"
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}/monthly-comparisons")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v1/sites/{site-id}/monthly-comparisons")
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[
{
"month": 123,
"currentYearMonthConsumption": {
"energy": 123,
"totalCost": 123
},
"previousYearMonthConsumption": {
"energy": 123,
"totalCost": 123
},
"beginMonthDay": "<string>",
"endMonthDay": "<string>",
"isFullMonth": true,
"energyDifferenceRate": 123,
"totalCostDifferenceRate": 123
}
]{
"errorCode": "<string>",
"errorDescription": "<string>"
}This response has no body data.This response has no body data.This response has no body data.Path Parameters
site identifier
Query Parameters
the current year of months comparison (example : 2016)
possible values : GAS, ELEC
Response
successful response
month of the comparison (example 11)
Show child attributes
Show child attributes
Show child attributes
Show child attributes
begin month day of the comparison period. ISO-8601 format --MM-DD (example --12-01)
end month day of the comparison period. ISO-8601 format --MM-DD (example --12-15)
true is if the month is full, false otherwise
% of energy increase or decrease between the month of the previous year and the month current year (example 7)
% of totalCost increase or decrease between the month of the previous year and the month current year (example -5)