Retrieve control scenario executions history for a site
curl --request GET \
--url https://api.home.datanumia.com/api/v2/sites/{site-id}/control-scenarios/executionsimport requests
url = "https://api.home.datanumia.com/api/v2/sites/{site-id}/control-scenarios/executions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v2/sites/{site-id}/control-scenarios/executions', 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}/control-scenarios/executions",
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}/control-scenarios/executions"
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}/control-scenarios/executions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v2/sites/{site-id}/control-scenarios/executions")
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",
"gain": "EUR"
},
"_embedded": {
"executions": [
{
"id": "1abc62bb-1a39-4342-b6fd-2389a335b20a_01",
"scenarioId": "DREEV_SMART_CHARGING",
"type": "STOP",
"status": "OK",
"modificationTs": "2024-12-31T23:00:00Z",
"trigger": {
"tariffOption": null,
"value": null,
"type": null,
"beginTs": null,
"endTs": null
},
"devicesExecutions": [
{
"id": "42fad7e9-9e14-40cd-8774-f35595afc0b7_01",
"status": "OK",
"deviceId": "5gth-40cd-8774-f35595afc0b7_01",
"ts": "2024-12-24 23:00:00+00:00"
}
],
"consumption": {
"period": {
"startTime": "2024-12-24T14:15:22Z",
"endTime": "2024-12-24T22:15:22Z"
},
"energyMeter": {
"total": 1000,
"unoptimized": 300,
"smart": 700,
"smartRatio": 0.7
},
"cost": {
"realCost": 3,
"fullUnoptimizedEstimatedCost": 4.3
}
},
"gain": {
"total": 1.3
}
}
]
},
"_links": {
"self": {
"href": "<string>",
"hreflang": "<string>",
"title": "<string>",
"type": "<string>",
"deprecation": "<string>",
"profile": "<string>",
"name": "<string>",
"templated": true
},
"first": {
"href": "<string>",
"hreflang": "<string>",
"title": "<string>",
"type": "<string>",
"deprecation": "<string>",
"profile": "<string>",
"name": "<string>",
"templated": true
},
"next": {
"href": "<string>",
"hreflang": "<string>",
"title": "<string>",
"type": "<string>",
"deprecation": "<string>",
"profile": "<string>",
"name": "<string>",
"templated": true
},
"last": {
"href": "<string>",
"hreflang": "<string>",
"title": "<string>",
"type": "<string>",
"deprecation": "<string>",
"profile": "<string>",
"name": "<string>",
"templated": true
}
},
"page": {
"size": 123,
"totalElements": 123,
"totalPages": 123,
"number": 123
},
"totalConsumptions": {
"energyMeter": {
"total": 10000,
"smart": 8000,
"unoptimized": 2000,
"smartRatio": 0.8
},
"cost": {
"realCost": 50,
"fullUnoptimizedEstimatedCost": 76
},
"gain": {
"total": 26
}
}
}{
"type": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"instance": "<string>",
"properties": {}
}{
"type": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"instance": "<string>",
"properties": {}
}{
"type": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"instance": "<string>",
"properties": {}
}Control scenarios executions
Retrieve control scenario executions history for a site
This API is used to get control scenarios executions history for a site.
GET
/
sites
/
{site-id}
/
control-scenarios
/
executions
Retrieve control scenario executions history for a site
curl --request GET \
--url https://api.home.datanumia.com/api/v2/sites/{site-id}/control-scenarios/executionsimport requests
url = "https://api.home.datanumia.com/api/v2/sites/{site-id}/control-scenarios/executions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v2/sites/{site-id}/control-scenarios/executions', 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}/control-scenarios/executions",
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}/control-scenarios/executions"
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}/control-scenarios/executions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v2/sites/{site-id}/control-scenarios/executions")
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",
"gain": "EUR"
},
"_embedded": {
"executions": [
{
"id": "1abc62bb-1a39-4342-b6fd-2389a335b20a_01",
"scenarioId": "DREEV_SMART_CHARGING",
"type": "STOP",
"status": "OK",
"modificationTs": "2024-12-31T23:00:00Z",
"trigger": {
"tariffOption": null,
"value": null,
"type": null,
"beginTs": null,
"endTs": null
},
"devicesExecutions": [
{
"id": "42fad7e9-9e14-40cd-8774-f35595afc0b7_01",
"status": "OK",
"deviceId": "5gth-40cd-8774-f35595afc0b7_01",
"ts": "2024-12-24 23:00:00+00:00"
}
],
"consumption": {
"period": {
"startTime": "2024-12-24T14:15:22Z",
"endTime": "2024-12-24T22:15:22Z"
},
"energyMeter": {
"total": 1000,
"unoptimized": 300,
"smart": 700,
"smartRatio": 0.7
},
"cost": {
"realCost": 3,
"fullUnoptimizedEstimatedCost": 4.3
}
},
"gain": {
"total": 1.3
}
}
]
},
"_links": {
"self": {
"href": "<string>",
"hreflang": "<string>",
"title": "<string>",
"type": "<string>",
"deprecation": "<string>",
"profile": "<string>",
"name": "<string>",
"templated": true
},
"first": {
"href": "<string>",
"hreflang": "<string>",
"title": "<string>",
"type": "<string>",
"deprecation": "<string>",
"profile": "<string>",
"name": "<string>",
"templated": true
},
"next": {
"href": "<string>",
"hreflang": "<string>",
"title": "<string>",
"type": "<string>",
"deprecation": "<string>",
"profile": "<string>",
"name": "<string>",
"templated": true
},
"last": {
"href": "<string>",
"hreflang": "<string>",
"title": "<string>",
"type": "<string>",
"deprecation": "<string>",
"profile": "<string>",
"name": "<string>",
"templated": true
}
},
"page": {
"size": 123,
"totalElements": 123,
"totalPages": 123,
"number": 123
},
"totalConsumptions": {
"energyMeter": {
"total": 10000,
"smart": 8000,
"unoptimized": 2000,
"smartRatio": 0.8
},
"cost": {
"realCost": 50,
"fullUnoptimizedEstimatedCost": 76
},
"gain": {
"total": 26
}
}
}{
"type": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"instance": "<string>",
"properties": {}
}{
"type": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"instance": "<string>",
"properties": {}
}{
"type": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"instance": "<string>",
"properties": {}
}Path Parameters
Site identifier.
Query Parameters
Control scenario identifier.
The minimal begin date, format ISO8601 (YYYY-MM-DDThh:mm:ssZ)
The maximal begin date, format ISO8601 (YYYY-MM-DDThh:mm:ssZ)
The page to be fetched.
The page size to be fetched. Max value is 100.
Required range:
x <= 100