cURL
curl --request GET \
--url https://api.home.datanumia.com/api/v1/sites/{site-id}/challenges/{challenge-id}/actionsimport requests
url = "https://api.home.datanumia.com/api/v1/sites/{site-id}/challenges/{challenge-id}/actions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v1/sites/{site-id}/challenges/{challenge-id}/actions', 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}/challenges/{challenge-id}/actions",
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}/challenges/{challenge-id}/actions"
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}/challenges/{challenge-id}/actions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v1/sites/{site-id}/challenges/{challenge-id}/actions")
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{
"actionId": "HEATING_DROP_2C",
"actionType": "DROP",
"usageType": "US_HEATING",
"globalSaving": 2,
"status": "ALREADY_DONE",
"usageSaving": 4,
"kwhGlobalSavingPerDay": 5,
"actionSavingPeriod": "ALL"
}{
"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": {}
}Challenge's actions
Get sites challenges actions
This API returns :
- the targeted actions for the site and the challenge
- the usage type per action
- the status per action (ALREADY_DONE or ENGAGED)
- the number of engaged sites per action
- the estimated saving percentage on the usage per action
GET
/
sites
/
{site-id}
/
challenges
/
{challenge-id}
/
actions
cURL
curl --request GET \
--url https://api.home.datanumia.com/api/v1/sites/{site-id}/challenges/{challenge-id}/actionsimport requests
url = "https://api.home.datanumia.com/api/v1/sites/{site-id}/challenges/{challenge-id}/actions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.home.datanumia.com/api/v1/sites/{site-id}/challenges/{challenge-id}/actions', 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}/challenges/{challenge-id}/actions",
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}/challenges/{challenge-id}/actions"
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}/challenges/{challenge-id}/actions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.home.datanumia.com/api/v1/sites/{site-id}/challenges/{challenge-id}/actions")
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{
"actionId": "HEATING_DROP_2C",
"actionType": "DROP",
"usageType": "US_HEATING",
"globalSaving": 2,
"status": "ALREADY_DONE",
"usageSaving": 4,
"kwhGlobalSavingPerDay": 5,
"actionSavingPeriod": "ALL"
}{
"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
The challenge identifier
Query Parameters
The action saving period
Available options:
ALL, HP Response
Successful response
The action identifier
Example:
"HEATING_DROP_2C"
The action type
Available options:
DROP, SWITCHOFF, SHIFT Example:
"DROP"
The usage type
Example:
"US_HEATING"
The estimated saving percentage on the global consumption of the called site-id
Example:
2
The action status
Available options:
ALREADY_DONE, ENGAGED The estimated saving percentage on the action's usage
Example:
4
The global saving kwh per day
Example:
5
The action saving period
Available options:
ALL, HP Example:
"ALL"