---
title: Edit AAPM Account
slug: kron-pam-api-collection-340/edit-aapm-account
docTags: 
createdAt: 2024-07-12T13:38:00.278Z
---

{
  "id": "JHSPTbbBL_95Qn2Z8DBhH",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "http://localhost/aioc-rest-web/rest/aapm/editAapmAccount",
    "name": "",
    "description": "<p>This API enables to edit AAPM accounts existing ones. To edit existing accounts, db id parameter of existing account shoould be filled.</p>",
    "contentType": "application/json",
    "request": {
      "headerParameters": [
        {
          "name": "x-xsrf-token",
          "description": "",
          "default": "{{x-xsrf-token}}",
          "value": "{{x-xsrf-token}}",
          "type": "string"
        }
      ],
      "queryParameters": [],
      "pathParameters": [],
      "bodyDataParameters": [
        {
          "name": "body",
          "description": "",
          "default": "{\r\n    \"dbId\": 237913,\r\n    \"applicationName\": \"My New Updated AAPM Account\",\r\n    \"applicationIPs\": [\"0.0.0.0/0\"],\r\n    \"sapmAccounts\": null,\t\r\n    \"sapmGroups\": [19731, 73758, 109612, 109635],\r\n    \"restrictions\": {\r\n        \"allowListingAccounts\": true,\r\n        \"maxUsageCount\": \"50\"\r\n    \t}\r\n}",
          "value": "{\r\n    \"dbId\": 237913,\r\n    \"applicationName\": \"My New Updated AAPM Account\",\r\n    \"applicationIPs\": [\"0.0.0.0/0\"],\r\n    \"sapmAccounts\": null,\t\r\n    \"sapmGroups\": [19731, 73758, 109612, 109635],\r\n    \"restrictions\": {\r\n        \"allowListingAccounts\": true,\r\n        \"maxUsageCount\": \"50\"\r\n    \t}\r\n}",
          "type": "object"
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": ""
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "OrI0ticBnAP6LiUcuQ7xl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url http://localhost/aioc-rest-web/rest/aapm/editAapmAccount \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-xsrf-token: {{x-xsrf-token}}' \\\n     --data '\"{\\r\\n    \\\"dbId\\\": 237913,\\r\\n    \\\"applicationName\\\": \\\"My New Updated AAPM Account\\\",\\r\\n    \\\"applicationIPs\\\": [\\\"0.0.0.0/0\\\"],\\r\\n    \\\"sapmAccounts\\\": null,\\t\\r\\n    \\\"sapmGroups\\\": [19731, 73758, 109612, 109635],\\r\\n    \\\"restrictions\\\": {\\r\\n        \\\"allowListingAccounts\\\": true,\\r\\n        \\\"maxUsageCount\\\": \\\"50\\\"\\r\\n    \\t}\\r\\n}\"'"
        },
        {
          "id": "29aVXooaCDAkZaQQGY6pO",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-xsrf-token\", \"{{x-xsrf-token}}\");\n\nvar raw = JSON.stringify(\"{\\r\\n    \\\"dbId\\\": 237913,\\r\\n    \\\"applicationName\\\": \\\"My New Updated AAPM Account\\\",\\r\\n    \\\"applicationIPs\\\": [\\\"0.0.0.0/0\\\"],\\r\\n    \\\"sapmAccounts\\\": null,\\t\\r\\n    \\\"sapmGroups\\\": [19731, 73758, 109612, 109635],\\r\\n    \\\"restrictions\\\": {\\r\\n        \\\"allowListingAccounts\\\": true,\\r\\n        \\\"maxUsageCount\\\": \\\"50\\\"\\r\\n    \\t}\\r\\n}\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"http://localhost/aioc-rest-web/rest/aapm/editAapmAccount\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "VoZZ2FNZ9YEJth7qqHeKX",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://localhost/aioc-rest-web/rest/aapm/editAapmAccount\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-xsrf-token\"] = \"{{x-xsrf-token}}\"\nrequest.body = JSON.dump(\"{\\r\\n    \\\"dbId\\\": 237913,\\r\\n    \\\"applicationName\\\": \\\"My New Updated AAPM Account\\\",\\r\\n    \\\"applicationIPs\\\": [\\\"0.0.0.0/0\\\"],\\r\\n    \\\"sapmAccounts\\\": null,\\t\\r\\n    \\\"sapmGroups\\\": [19731, 73758, 109612, 109635],\\r\\n    \\\"restrictions\\\": {\\r\\n        \\\"allowListingAccounts\\\": true,\\r\\n        \\\"maxUsageCount\\\": \\\"50\\\"\\r\\n    \\t}\\r\\n}\")\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "67SCoyC8MQIbSVH8GQnkI",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://localhost/aioc-rest-web/rest/aapm/editAapmAccount\"\n\npayload = json.dumps(\"{\\r\\n    \\\"dbId\\\": 237913,\\r\\n    \\\"applicationName\\\": \\\"My New Updated AAPM Account\\\",\\r\\n    \\\"applicationIPs\\\": [\\\"0.0.0.0/0\\\"],\\r\\n    \\\"sapmAccounts\\\": null,\\t\\r\\n    \\\"sapmGroups\\\": [19731, 73758, 109612, 109635],\\r\\n    \\\"restrictions\\\": {\\r\\n        \\\"allowListingAccounts\\\": true,\\r\\n        \\\"maxUsageCount\\\": \\\"50\\\"\\r\\n    \\t}\\r\\n}\")\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-xsrf-token': '{{x-xsrf-token}}'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "OrI0ticBnAP6LiUcuQ7xl"
    },
    "results": {
      "languages": [
        {
          "id": "X5YaR6l21FxbQe96WpAr4",
          "language": "200",
          "code": ""
        }
      ],
      "selectedLanguageId": "X5YaR6l21FxbQe96WpAr4"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}