---
title: Local Control of Load Management [Rest API]
slug: dev/local-control-of-load-management-rest-api
createdAt: 2024-04-16T12:35:10.499Z
---

:::hint{type="info"}
To activate the API server, please contact support\@clemap.com
:::

:::hint{type="warning"}
The API returns an HTTP status code 500 (Internal Server Error) if certain fields are incorrect or invalid.&#x20;

**Good to know:**

Ensure that all required fields are correctly formatted and validated to avoid this error.&#x20;
:::

:::hint{type="warning"}
If you only want to read measuring data locally, you're in the wrong place—you need the [Realtime energy data \[Modbus TCP Server\]](docId\:BHJz3X-44AS5wamBGGZgQ) .
:::



:::ApiMethodV2
```json
{
  "name": "Live Data",
  "method": "GET",
  "url": "https://[edge_device_ip]:7000/v1/live/data",
  "description": "Provides live updated values of the consumption and status of the load CLM.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "yY2m7KuyLxVgrxk1gD1Ib",
        "language": "curl",
        "code": "curl --location --globoff 'https://[edge_device_ip]:7000/v1/live/data' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json'",
        "customLabel": ""
      },
      {
        "id": "aAxvwcIiz6QhMqT9WAg4N",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'GET',\n   'url': 'https://[edge_device_ip]:7000/v1/live/data',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   }\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "9ptnTYot6TqZKLKEdUELB",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://[edge_device_ip]:7000/v1/live/data\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "_UeMx_Hl7mT_Wyr9-yJtY",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://[edge_device_ip]:7000/v1/live/data\"\n\npayload = {}\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "-BmZl47gSVvT9_H6PuHKg",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://[edge_device_ip]:7000/v1/live/data\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Content-Type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "yY2m7KuyLxVgrxk1gD1Ib"
  },
  "results": {
    "languages": [
      {
        "id": "ROWP0wAdaUqaJbQUa3qeG",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"ActualActivePower\": \"float\", // active power measured by the edge device in W\n    \"ActualReactivePower\": \"float\", // reactive power measured by the edge device in VAR\n    \"ActualCurrentL1\": \"float\", // current measured by the edge device on phase L1 in A\n    \"ActualCurrentL2\": \"float\", // current measured by the edge device on phase L2 in A\n    \"ActualCurrentL3\": \"float\", // current measured by the edge device on phase L3 in A\n    \"ActualCurrentSum\": \"float\", // current measured by the edge device, sum over all phases in A\n    \"Status\": \"string\", // aggregated status of all the EVSE controlled by the CLM\n}"
      }
    ],
    "selectedLanguageId": "ROWP0wAdaUqaJbQUa3qeG"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "Authorization",
        "kind": "required",
        "type": "string",
        "description": "user and password encoded in base64 following basic auth specification",
        "children": []
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "autoGeneratedAnchorSlug": "live-data",
  "legacyHash": "t7oVEG7Umd-l-WlVL_t-P"
}
```
:::

:::ApiMethodV2
```json
{
  "name": "Get Settings",
  "method": "GET",
  "url": "https://[edge_device_ip]:7000/v1/flex_management/setting",
  "description": "Return current API settings",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "0mkf6kBnk574Pjvt3c6nv",
        "language": "curl",
        "code": "curl --location --globoff 'https://[edge_device_ip]:7000/v1/flex_management_settings' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json'",
        "customLabel": ""
      },
      {
        "id": "Gm8Gqden0FcCsA7uu0-QW",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'GET',\n   'url': 'https://[edge_device_ip]:7000/v1/flex_management_settings',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   }\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "v0Xo9oXOzhfm5dCqIdY0F",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://[edge_device_ip]:7000/v1/flex_management_settings\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "BrdUeKsVhDGgFl8PPtdRE",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://[edge_device_ip]:7000/v1/flex_management_settings\"\n\npayload = {}\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "3Z1d1nLd-a9gAox7yDobQ",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://[edge_device_ip]:7000/v1/flex_management_settings\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Content-Type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "0mkf6kBnk574Pjvt3c6nv"
  },
  "results": {
    "languages": [
      {
        "id": "B6wgdM1BpBH1eLupXMfFB",
        "language": "200",
        "customLabel": "",
        "code": "{\n    \"ActivePowerActivation\": \"bool\", // true if cascading is enabled otherwise false\n    \"FallbackCurrentLimit\": \"float\", // current limit if keep alive endpoint is not called every 120 sec (default)\n    \"CurrentLimit\": \"float\", // LM current limit that is configured currently\n    \"RunState\": True, // [TBD by SmartGridready] currently alwasy true\n    \"ReadinessState\": True, // [TBD by SmartGridready] currently alwasy true\n    \"MaxActivePower\": 0.0, // [TBD by SmartGridready] currently alwasy 0.0\n    \"MinActivePower\": 0.0, // [TBD by SmartGridready] currently alwasy 0.0\n}"
      }
    ],
    "selectedLanguageId": "B6wgdM1BpBH1eLupXMfFB"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "Authorization",
        "kind": "required",
        "type": "string",
        "description": "user and password encoded in base64 following basic auth specification",
        "children": []
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "get-settings",
  "legacyHash": "09oxRLHCMqjvglb888eI7"
}
```
:::

:::ApiMethodV2
```json
{
  "name": "Update Settings",
  "method": "POST",
  "url": "https://[edge_device_ip]:7000/v1/flex_management/setting",
  "description": "Update API settings",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "S6ZPGs8xxwRphSeDYl_Eh",
        "language": "curl",
        "code": "curl --location --globoff 'https://[edge_device_ip]:7000/v1/flex_management/setting' \\\n--header 'Authorization: string' \\\n--data '{\n  \"ActivePowerActivation\": \"Boolean\",\n  \"CurrentLimit\": \"Number\",\n  \"FallbackCurrentLimit\": \"Number\"\n}'",
        "customLabel": ""
      },
      {
        "id": "VdmwDWtmFHMG5tFSIBxTC",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'POST',\n   'url': 'https://[edge_device_ip]:7000/v1/flex_management/setting',\n   'headers': {\n      'Authorization': 'string'\n   },\n   body: '{\"ActivePowerActivation\":\"Boolean\",\"CurrentLimit\":\"Number\",\"FallbackCurrentLimit\":\"Number\"}'\n\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "YBWwIZ3Gvrxfn5ZOKtRVc",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Authorization\", \"string\");\n\nvar raw = \"{\\\"ActivePowerActivation\\\":\\\"Boolean\\\",\\\"CurrentLimit\\\":\\\"Number\\\",\\\"FallbackCurrentLimit\\\":\\\"Number\\\"}\";\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://[edge_device_ip]:7000/v1/flex_management/setting\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "7DhFrqys7r2Vop0_1KNVN",
        "language": "python",
        "code": "import requests\n\nurl = \"https://[edge_device_ip]:7000/v1/flex_management/setting\"\n\npayload = \"{\\\"ActivePowerActivation\\\":\\\"Boolean\\\",\\\"CurrentLimit\\\":\\\"Number\\\",\\\"FallbackCurrentLimit\\\":\\\"Number\\\"}\"\nheaders = {\n   'Authorization': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "JD5w8iDO2XF-d-IcPerhv",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://[edge_device_ip]:7000/v1/flex_management/setting\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Authorization\"] = \"string\"\nrequest.body = \"{\\\"ActivePowerActivation\\\":\\\"Boolean\\\",\\\"CurrentLimit\\\":\\\"Number\\\",\\\"FallbackCurrentLimit\\\":\\\"Number\\\"}\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "VdmwDWtmFHMG5tFSIBxTC"
  },
  "results": {
    "languages": [
      {
        "id": "BTxOHhHWU9YlLah9o3glJ",
        "language": "200",
        "customLabel": "",
        "code": ""
      }
    ],
    "selectedLanguageId": "BTxOHhHWU9YlLah9o3glJ"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "Authorization",
        "kind": "required",
        "type": "string",
        "description": "user and password encoded in base64 following basic auth specification",
        "children": []
      }
    ],
    "bodyDataParameters": [
      {
        "name": "ActivePowerActivation",
        "kind": "optional",
        "type": "Boolean",
        "description": "enable or disable LM controll over API",
        "children": []
      },
      {
        "name": "CurrentLimit",
        "kind": "optional",
        "type": "Number",
        "description": "load management current limit",
        "children": []
      },
      {
        "name": "FallbackCurrentLimit",
        "kind": "optional",
        "type": "Number",
        "description": "limit if keep alive endpoint is not called every 120 sec (default)",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "update-settings",
  "legacyHash": "tP0roLDU2krlNlS-gVt8d"
}
```
:::

:::ApiMethodV2
```json
{
  "name": "Keep Alive",
  "method": "POST",
  "url": "https://[edge_device_ip]:7000/v1/keep_alive",
  "description": "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).",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "zxeGTBI5SzxdTFVkL8T3S",
        "language": "curl",
        "code": "curl --location --globoff --request POST 'https://[edge_device_ip]:7000/v1/keep_alive' \\\n--header 'Accept: application/json' \\\n--header 'Content-Type: application/json'",
        "customLabel": ""
      },
      {
        "id": "4xsbUaxPxgvKPDAZWX76c",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'POST',\n   'url': 'https://[edge_device_ip]:7000/v1/keep_alive',\n   'headers': {\n      'Accept': 'application/json',\n      'Content-Type': 'application/json'\n   }\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "asxhit2bFgWQQ6DsF1moz",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Accept\", \"application/json\");\nmyHeaders.append(\"Content-Type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://[edge_device_ip]:7000/v1/keep_alive\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "Iq8sBTWbMZVB3E7pQf3wG",
        "language": "python",
        "code": "import requests\nimport json\n\nurl = \"https://[edge_device_ip]:7000/v1/keep_alive\"\n\npayload = {}\nheaders = {\n   'Accept': 'application/json',\n   'Content-Type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "wOMNgjvh6fOIeNRPchZYu",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://[edge_device_ip]:7000/v1/keep_alive\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Content-Type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "zxeGTBI5SzxdTFVkL8T3S"
  },
  "results": {
    "languages": [
      {
        "id": "XNVp9ZaBQidce6yzESZDO",
        "language": "200",
        "customLabel": "",
        "code": ""
      }
    ],
    "selectedLanguageId": "XNVp9ZaBQidce6yzESZDO"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "Authorization",
        "kind": "required",
        "type": "string",
        "description": "user and password encoded in base64 following basic auth specification",
        "children": []
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "autoGeneratedAnchorSlug": "keep-alive",
  "legacyHash": "TOGjQ1HLvPZRWSpMrnl4Z"
}
```
:::

