Consumptions with load curve
curl --request GET \
--url https://api.home.datanumia.com/api/v2/sites/{site-id}/consumptions/load-curveimport requests
url = "https://api.home.datanumia.com/api/v2/sites/{site-id}/consumptions/load-curve"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v2/sites/{site-id}/consumptions/load-curve', 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/v2/sites/{site-id}/consumptions/load-curve",
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/v2/sites/{site-id}/consumptions/load-curve"
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/v2/sites/{site-id}/consumptions/load-curve")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v2/sites/{site-id}/consumptions/load-curve")
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{
"period": {
"startTime": "2022-01-01T00:00:00+01:00",
"endTime": "2023-01-01T00:00:00+01:00"
},
"step": "P1M",
"units": {
"cost": "EUR",
"energyMeter": "KWH"
},
"consumptions": [
{
"period": {
"startTime": "2023-02-01T00:00:00+01:00",
"endTime": "2023-03-01T00:00:00+01:00"
},
"energyMeter": {
"total": 453.232,
"byTariffHeading": {
"HP": 289.226,
"HC": 164.006
}
},
"cost": {
"total": 87.12537060000002,
"standingCharge": 12.15250000000001,
"standingChargeByComponents": {},
"byTariffHeading": {
"HP": 52.668054600000005,
"HC": 22.304816000000002
}
},
"quality": 1,
"errorFlags": [],
"indexNatures": [],
"status": "COMPLETE",
"nature": "REAL",
"aggregated": true,
"usingLoadCurve": true
}
]
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}Electric energy consumptions
Consumptions with load curve
The service returns the electrical consumption of a given site between two specified dates at the requested step, only by using load curve data.
GET
/
v2
/
sites
/
{site-id}
/
consumptions
/
load-curve
Consumptions with load curve
curl --request GET \
--url https://api.home.datanumia.com/api/v2/sites/{site-id}/consumptions/load-curveimport requests
url = "https://api.home.datanumia.com/api/v2/sites/{site-id}/consumptions/load-curve"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v2/sites/{site-id}/consumptions/load-curve', 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/v2/sites/{site-id}/consumptions/load-curve",
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/v2/sites/{site-id}/consumptions/load-curve"
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/v2/sites/{site-id}/consumptions/load-curve")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v2/sites/{site-id}/consumptions/load-curve")
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{
"period": {
"startTime": "2022-01-01T00:00:00+01:00",
"endTime": "2023-01-01T00:00:00+01:00"
},
"step": "P1M",
"units": {
"cost": "EUR",
"energyMeter": "KWH"
},
"consumptions": [
{
"period": {
"startTime": "2023-02-01T00:00:00+01:00",
"endTime": "2023-03-01T00:00:00+01:00"
},
"energyMeter": {
"total": 453.232,
"byTariffHeading": {
"HP": 289.226,
"HC": 164.006
}
},
"cost": {
"total": 87.12537060000002,
"standingCharge": 12.15250000000001,
"standingChargeByComponents": {},
"byTariffHeading": {
"HP": 52.668054600000005,
"HC": 22.304816000000002
}
},
"quality": 1,
"errorFlags": [],
"indexNatures": [],
"status": "COMPLETE",
"nature": "REAL",
"aggregated": true,
"usingLoadCurve": true
}
]
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}{
"errorCode": "<string>",
"errorDescription": "<string>"
}Path Parameters
The site identifier
Query Parameters
The starting timestamp to calculate the consumption from. Accepted format:
- YYYY-MM-DDThh:mm:ss
- YYYY-MM-DDThh:mm:ssZ
- YYYY-MM-DDThh:mm:ss+XX:XX
The ending timestamp (excluded) until which to calculate the consumption. Accepted format:
- YYYY-MM-DDThh:mm:ss
- YYYY-MM-DDThh:mm:ssZ
- YYYY-MM-DDThh:mm:ss+XX:XX
Step unit in which consumption will be returned, global consumption will be returned if this field is not provided
Available options:
YEARS, MONTHS, DAYS, HOURS, MINUTES Step value in which consumption will be returned.