Local Control of Load Management [Rest API]
To activate the API server, please contact [email protected]
The API returns an HTTP status code 500 (Internal Server Error) if certain fields are incorrect or invalid.
Good to know:
Ensure that all required fields are correctly formatted and validated to avoid this error.
If you only want to read measuring data locally, you're in the wrong place—you need the Realtime energy data [Modbus TCP Server] .
Live Data
Provides live updated values of the consumption and status of the load CLM.
GET
https://[edge_device_ip]:7000/v1/live/data
Header Parameters
- AuthorizationstringrequiredDescription
curl
curl --location --globoff 'https://[edge_device_ip]:7000/v1/live/data' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'nodejs
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://[edge_device_ip]:7000/v1/live/data',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://[edge_device_ip]:7000/v1/live/data", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://[edge_device_ip]:7000/v1/live/data"
payload = {}
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://[edge_device_ip]:7000/v1/live/data")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
response = https.request(request)
puts response.read_body
200
{
"ActualActivePower": "float", // active power measured by the edge device in W
"ActualReactivePower": "float", // reactive power measured by the edge device in VAR
"ActualCurrentL1": "float", // current measured by the edge device on phase L1 in A
"ActualCurrentL2": "float", // current measured by the edge device on phase L2 in A
"ActualCurrentL3": "float", // current measured by the edge device on phase L3 in A
"ActualCurrentSum": "float", // current measured by the edge device, sum over all phases in A
"Status": "string", // aggregated status of all the EVSE controlled by the CLM
}Get Settings
Return current API settings
GET
https://[edge_device_ip]:7000/v1/flex_management/setting
Header Parameters
- AuthorizationstringrequiredDescription
curl
curl --location --globoff 'https://[edge_device_ip]:7000/v1/flex_management_settings' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'nodejs
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://[edge_device_ip]:7000/v1/flex_management_settings',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://[edge_device_ip]:7000/v1/flex_management_settings", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://[edge_device_ip]:7000/v1/flex_management_settings"
payload = {}
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://[edge_device_ip]:7000/v1/flex_management_settings")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
response = https.request(request)
puts response.read_body
200
{
"ActivePowerActivation": "bool", // true if cascading is enabled otherwise false
"FallbackCurrentLimit": "float", // current limit if keep alive endpoint is not called every 120 sec (default)
"CurrentLimit": "float", // LM current limit that is configured currently
"RunState": True, // [TBD by SmartGridready] currently alwasy true
"ReadinessState": True, // [TBD by SmartGridready] currently alwasy true
"MaxActivePower": 0.0, // [TBD by SmartGridready] currently alwasy 0.0
"MinActivePower": 0.0, // [TBD by SmartGridready] currently alwasy 0.0
}Update Settings
Update API settings
POST
https://[edge_device_ip]:7000/v1/flex_management/setting
Header Parameters
- AuthorizationstringrequiredDescription
Body Parameters
- ActivePowerActivationBooleanDescription
- CurrentLimitNumberDescription
- FallbackCurrentLimitNumberDescription
curl
curl --location --globoff 'https://[edge_device_ip]:7000/v1/flex_management/setting' \
--header 'Authorization: string' \
--data '{
"ActivePowerActivation": "Boolean",
"CurrentLimit": "Number",
"FallbackCurrentLimit": "Number"
}'nodejs
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://[edge_device_ip]:7000/v1/flex_management/setting',
'headers': {
'Authorization': 'string'
},
body: '{"ActivePowerActivation":"Boolean","CurrentLimit":"Number","FallbackCurrentLimit":"Number"}'
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Authorization", "string");
var raw = "{\"ActivePowerActivation\":\"Boolean\",\"CurrentLimit\":\"Number\",\"FallbackCurrentLimit\":\"Number\"}";
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://[edge_device_ip]:7000/v1/flex_management/setting", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
url = "https://[edge_device_ip]:7000/v1/flex_management/setting"
payload = "{\"ActivePowerActivation\":\"Boolean\",\"CurrentLimit\":\"Number\",\"FallbackCurrentLimit\":\"Number\"}"
headers = {
'Authorization': 'string'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "net/http"
url = URI("https://[edge_device_ip]:7000/v1/flex_management/setting")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = "string"
request.body = "{\"ActivePowerActivation\":\"Boolean\",\"CurrentLimit\":\"Number\",\"FallbackCurrentLimit\":\"Number\"}"
response = https.request(request)
puts response.read_body
200
Keep Alive
This endpoint resets the internal timeout and prevents the CLM to enter into the fallback current limit mode. This endpoint should be called at least once every 120 seconds (default).
POST
https://[edge_device_ip]:7000/v1/keep_alive
Header Parameters
- AuthorizationstringrequiredDescription
curl
curl --location --globoff --request POST 'https://[edge_device_ip]:7000/v1/keep_alive' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'nodejs
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://[edge_device_ip]:7000/v1/keep_alive',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://[edge_device_ip]:7000/v1/keep_alive", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://[edge_device_ip]:7000/v1/keep_alive"
payload = {}
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://[edge_device_ip]:7000/v1/keep_alive")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
response = https.request(request)
puts response.read_body
200