Get removed consumptions (depending on the provided site and filters)
curl --request GET \
--url https://api.home.datanumia.com/api/v1/sites/{site-id}/removed-consumptionsimport requests
url = "https://api.home.datanumia.com/api/v1/sites/{site-id}/removed-consumptions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v1/sites/{site-id}/removed-consumptions', 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}/removed-consumptions",
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}/removed-consumptions"
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}/removed-consumptions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v1/sites/{site-id}/removed-consumptions")
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": {
"energyMeter": "KWH",
"cost": "EUR",
"reward": "EUR"
},
"removedConsumptions": [
{
"beginTs": "2023-01-01T00:00:00Z",
"endTs": "2023-01-01T00:00:00Z",
"generationTs": "2023-01-01T00:00:00Z",
"challengeId": "CHALLENGE_2023_01",
"challengeType": "PEAK_DAY",
"realConsumption": {
"energyMeter": {
"total": 10.38
},
"cost": {
"total": 20.23
}
},
"forecastConsumption": {
"energyMeter": {
"total": 10.38
},
"cost": {
"total": 20.23
}
},
"removedConsumption": {
"energyMeter": {
"total": 10.38
},
"cost": {
"total": 20.23
},
"reward": {
"total": 20.23
}
},
"status": "OK",
"reason": "REAL_DATA_NOT_RECEIVED"
}
],
"aggregations": [
{
"challengeType": "PEAK_DAY",
"removedConsumption": {
"energyMeter": {
"total": 10.38
},
"cost": {
"total": 20.23
},
"reward": {
"total": 20.23
}
}
}
]
}{
"type": {},
"status": 123,
"title": "<string>",
"detail": "<string>",
"instance": {},
"properties": {}
}{
"type": {},
"status": 123,
"title": "<string>",
"detail": "<string>",
"instance": {},
"properties": {}
}{
"type": {},
"status": 123,
"title": "<string>",
"detail": "<string>",
"instance": {},
"properties": {}
}RemovedConsumptions
Get removed consumptions (depending on the provided site and filters)
This API returns :
- a filtered list of removed consumptions
- a list of removals aggregations by type of challenge
GET
/
sites
/
{site-id}
/
removed-consumptions
Get removed consumptions (depending on the provided site and filters)
curl --request GET \
--url https://api.home.datanumia.com/api/v1/sites/{site-id}/removed-consumptionsimport requests
url = "https://api.home.datanumia.com/api/v1/sites/{site-id}/removed-consumptions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v1/sites/{site-id}/removed-consumptions', 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}/removed-consumptions",
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}/removed-consumptions"
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}/removed-consumptions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v1/sites/{site-id}/removed-consumptions")
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": {
"energyMeter": "KWH",
"cost": "EUR",
"reward": "EUR"
},
"removedConsumptions": [
{
"beginTs": "2023-01-01T00:00:00Z",
"endTs": "2023-01-01T00:00:00Z",
"generationTs": "2023-01-01T00:00:00Z",
"challengeId": "CHALLENGE_2023_01",
"challengeType": "PEAK_DAY",
"realConsumption": {
"energyMeter": {
"total": 10.38
},
"cost": {
"total": 20.23
}
},
"forecastConsumption": {
"energyMeter": {
"total": 10.38
},
"cost": {
"total": 20.23
}
},
"removedConsumption": {
"energyMeter": {
"total": 10.38
},
"cost": {
"total": 20.23
},
"reward": {
"total": 20.23
}
},
"status": "OK",
"reason": "REAL_DATA_NOT_RECEIVED"
}
],
"aggregations": [
{
"challengeType": "PEAK_DAY",
"removedConsumption": {
"energyMeter": {
"total": 10.38
},
"cost": {
"total": 20.23
},
"reward": {
"total": 20.23
}
}
}
]
}{
"type": {},
"status": 123,
"title": "<string>",
"detail": "<string>",
"instance": {},
"properties": {}
}{
"type": {},
"status": 123,
"title": "<string>",
"detail": "<string>",
"instance": {},
"properties": {}
}{
"type": {},
"status": 123,
"title": "<string>",
"detail": "<string>",
"instance": {},
"properties": {}
}Path Parameters
The site identifier
Query Parameters
The minimal begin date, format ISO8601 (YYYY-MM-DDThh:mm:ssZ)
The maximal begin date, format ISO8601 (YYYY-MM-DDThh:mm:ssZ)
The minimal end date, format ISO8601 (YYYY-MM-DDThh:mm:ssZ)
The maximal end date, format ISO8601 (YYYY-MM-DDThh:mm:ssZ)
The challenge type
Available options:
PEAK_DAY, REWARD_DAY, SHIFT_DAY, PERIOD, MARATHON, SPRINT, VARIATION_CONSUMPTION_DAY, REDUCE_CONSUMPTION_DAY, OVER_CONSUMPTION_DAY