---
title: Priority Settings
slug: dev/priority-settings
createdAt: 2024-07-26T09:33:12.650Z
---

:::ApiMethodV2
```json
{
  "name": "Get Priority Settings",
  "method": "GET",
  "url": "https://cloud.clemap.com:3032/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings",
  "description": "This method allows to retrieve the currently valid priority settings with a\ntimestamp until which the settings are valid. If there are no currently valid settings, the response values are null.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "mr1yXquQ2fuqZ58ei6QBp",
        "language": "curl",
        "code": "curl --location --globoff '/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings' \\\n--header 'evsetoken: string'",
        "customLabel": ""
      },
      {
        "id": "59maY7neveOwcKF8nNg2D",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'GET',\n   'url': '/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings',\n   'headers': {\n      'evsetoken': 'string'\n   }\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "QFkg-d-cIbZgrycLYW8xB",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"evsetoken\", \"string\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "sAnhmM0tbGu0HJswdC60n",
        "language": "python",
        "code": "import requests\n\nurl = \"/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings\"\n\npayload = {}\nheaders = {\n   'evsetoken': 'string'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "qDIyAYiuNu5yrdMSfdBE9",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"evsetoken\"] = \"string\"\n\nresponse = http.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "mr1yXquQ2fuqZ58ei6QBp"
  },
  "results": {
    "languages": [
      {
        "id": "Nd4NttKjFHtHJTSI-2WGc",
        "language": "200",
        "customLabel": "",
        "code": "{\n  \"current\": 10 | null,\n  \"valid_until\": \"2024-05-30T09:14:47.244362+00:00\" | null\n}"
      }
    ],
    "selectedLanguageId": "Nd4NttKjFHtHJTSI-2WGc"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "evsetoken",
        "kind": "required",
        "type": "string",
        "description": "EVSE authentication token for the specific charging station.",
        "children": []
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "autoGeneratedAnchorSlug": "get-priority-settings",
  "legacyHash": "yLNhxE9n7cf_FTux_N6W4"
}
```
:::

:::ApiMethodV2
```json
{
  "name": "Set Priority Settings",
  "method": "POST",
  "url": "https://cloud.clemap.com:3032/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings",
  "description": "This endpoint allows to use a specified amount of power for a charging station\nwith a higher priority for a certain duration (in seconds).\nFor example, in case of a PV system with a surplus, the charging station\ncould be controlled to use this surplus with a higher priority.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "QM1RrIVxiJj8IAtt6xlkT",
        "language": "curl",
        "code": "curl --location --globoff '/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings' \\\n--header 'evsetoken: string' \\\n--data '{\"current\":\"Integer\",\"duration\":\"Integer\"}'",
        "customLabel": ""
      },
      {
        "id": "RY5B3GPYJj_uKQu-XdWLP",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'POST',\n   'url': '/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings',\n   'headers': {\n      'evsetoken': 'string'\n   },\n   body: '{\"current\":\"Integer\",\"duration\":\"Integer\"}'\n\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "pfiCFok4igseV1TF25XtM",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"evsetoken\", \"string\");\n\nvar raw = \"{\\\"current\\\":\\\"Integer\\\",\\\"duration\\\":\\\"Integer\\\"}\";\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "lLIZdZiJA2SX_Inu-eoan",
        "language": "python",
        "code": "import requests\n\nurl = \"/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings\"\n\npayload = \"{\\\"current\\\":\\\"Integer\\\",\\\"duration\\\":\\\"Integer\\\"}\"\nheaders = {\n   'evsetoken': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "fFztsys_WI5aJxNcNvHAH",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"evsetoken\"] = \"string\"\nrequest.body = \"{\\\"current\\\":\\\"Integer\\\",\\\"duration\\\":\\\"Integer\\\"}\"\n\nresponse = http.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "QM1RrIVxiJj8IAtt6xlkT"
  },
  "results": {
    "languages": [
      {
        "id": "dEZ6_ipaI8Apy9ztlHPZi",
        "language": "201",
        "customLabel": "",
        "code": "{\n  \"state\": \"received\",\n  \"current\": 10,\n  \"duration\": 60\n}"
      }
    ],
    "selectedLanguageId": "dEZ6_ipaI8Apy9ztlHPZi"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "evsetoken",
        "kind": "required",
        "type": "string",
        "description": "EVSE authentication token for the specific charging station.",
        "children": []
      }
    ],
    "bodyDataParameters": [
      {
        "name": "current",
        "kind": "required",
        "type": "Integer",
        "description": "Current target in ampere."
      },
      {
        "name": "duration",
        "kind": "required",
        "type": "Integer",
        "description": "Duration in seconds",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "set-priority-settings",
  "legacyHash": "KpXJsUC8eABhTuXBr2C8H"
}
```
:::

:::ApiMethodV2
```json
{
  "name": "Reset Priority Settings",
  "method": "DELETE",
  "url": "https://cloud.clemap.com:3032/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings",
  "description": "This method allows to reset the priority settings. The previous settings\nare returned.",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "fXbSgPjyojqZYHlQzH95s",
        "language": "curl",
        "code": "curl --location --globoff --request DELETE '/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings' \\\n--header 'evsetoken: string'",
        "customLabel": ""
      },
      {
        "id": "_DK14aS-OcmkCyH48c_vZ",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'DELETE',\n   'url': '/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings',\n   'headers': {\n      'evsetoken': 'string'\n   }\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "Iglk4DfWR2WX5bIFs6CaZ",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"evsetoken\", \"string\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "Z7mhS1Lgr0BEr5441z6gx",
        "language": "python",
        "code": "import requests\n\nurl = \"/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings\"\n\npayload = {}\nheaders = {\n   'evsetoken': 'string'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "fcIgUqBGV84OwJT5FyrLY",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"/edgeDevices/{edge_device_id}/evses/{uuid}/prioritySettings\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"evsetoken\"] = \"string\"\n\nresponse = http.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "fXbSgPjyojqZYHlQzH95s"
  },
  "results": {
    "languages": [
      {
        "id": "0OHBB8VD6dlcvCgicfsmQ",
        "language": "200",
        "customLabel": "",
        "code": "{\n  \"current\": 10 | null,\n  \"valid_until\": \"2024-05-30T09:14:47.244362+00:00\" | null\n}"
      }
    ],
    "selectedLanguageId": "0OHBB8VD6dlcvCgicfsmQ"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "evsetoken",
        "kind": "required",
        "type": "string",
        "description": "EVSE authentication token for the specific charging station.",
        "children": []
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "autoGeneratedAnchorSlug": "reset-priority-settings",
  "legacyHash": "feoqi-FiZYGv98U0nQ5XC"
}
```
:::

