cURL
curl --request GET \
--url https://api.home.datanumia.com/api/v1/sites/{site-id}/yearly-gas-energies-comparisonsimport requests
url = "https://api.home.datanumia.com/api/v1/sites/{site-id}/yearly-gas-energies-comparisons"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v1/sites/{site-id}/yearly-gas-energies-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}/yearly-gas-energies-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}/yearly-gas-energies-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}/yearly-gas-energies-comparisons")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v1/sites/{site-id}/yearly-gas-energies-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[
{
"previousYear": {
"year": "<string>",
"beginMonth": "<string>",
"endMonth": "<string>",
"consumption": {
"energy": 123,
"cost": 123
},
"standingCharge": 123,
"totalCost": 123,
"fromDate": "<string>",
"toDate": "<string>"
},
"currentYear": {
"year": "<string>",
"beginMonth": "<string>",
"endMonth": "<string>",
"consumption": {
"energy": 123,
"cost": 123
},
"standingCharge": 123,
"totalCost": 123,
"fromDate": "<string>",
"toDate": "<string>"
},
"energyDifferenceRate": 123
}
]{
"errorCode": "<string>",
"errorDescription": "<string>"
}This response has no body data.This response has no body data.This response has no body data.API Reference
Get sites yearly gas energies comparisons
Get the yearly gas energies comparison between a year and the previous year for a list of years
GET
/
sites
/
{site-id}
/
yearly-gas-energies-comparisons
cURL
curl --request GET \
--url https://api.home.datanumia.com/api/v1/sites/{site-id}/yearly-gas-energies-comparisonsimport requests
url = "https://api.home.datanumia.com/api/v1/sites/{site-id}/yearly-gas-energies-comparisons"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v1/sites/{site-id}/yearly-gas-energies-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}/yearly-gas-energies-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}/yearly-gas-energies-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}/yearly-gas-energies-comparisons")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v1/sites/{site-id}/yearly-gas-energies-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[
{
"previousYear": {
"year": "<string>",
"beginMonth": "<string>",
"endMonth": "<string>",
"consumption": {
"energy": 123,
"cost": 123
},
"standingCharge": 123,
"totalCost": 123,
"fromDate": "<string>",
"toDate": "<string>"
},
"currentYear": {
"year": "<string>",
"beginMonth": "<string>",
"endMonth": "<string>",
"consumption": {
"energy": 123,
"cost": 123
},
"standingCharge": 123,
"totalCost": 123,
"fromDate": "<string>",
"toDate": "<string>"
},
"energyDifferenceRate": 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
List of years to get the comparisons separated by commas (example query : 2013,2014 - the comparison is done between 2014 and 2013 and between 2013 and 2012)