---
title: Add AAPM Account
slug: single-connect-api-3-0-3/add-aapm-account
description: Learn how to add an AAPM account through a simple curl code example in this document. Discover the essential headers and data to include in your POST request for a seamless account addition process.
docTags: 
createdAt: 2022-11-10T14:21:49.000Z
---

{
  "id": "dHLsDIwiy2JslhZTizVnT",
  "data": {
    "url": "{{url}}/aioc-rest-web/rest/aapm/addAapmAccount",
    "method": "POST",
    "request": {
      "pathParameters": [],
      "queryParameters": [],
      "headerParameters": [],
      "bodyDataParameters": [
        {
          "name": "body",
          "type": "string",
          "example": "{\r\n    \"dbId\": 962918,\r\n    \"applicationName\": \"New Aapm Account\",\r\n    \"activeTimeLimitation\": false,\r\n    \"activeUsageLimitation\": false,\r\n    \"addEventUser\": true,\r\n    \"allowListingAccounts\": false,\r\n    \"appHash\": \"\",\r\n    \"appPath\": \"\",\r\n    \"applicationIps\": [\r\n        \"10.10.10.10/0\"\r\n    ],\r\n    \"eventUserEid\": \"admin\",\r\n    \"eventUserId\": null,\r\n    \"expiryDate\": 1623238642873,\r\n    \"hashAlgorithmType\": \"MD5\",\r\n    \"lastAccessTime\": null,\r\n    \"manuelPassword\": null,\r\n    \"manuelUserName\": \"\",\r\n    \"maxUsageCount\": null,\r\n    \"numberOfUsage\": 0,\r\n    \"osType\": null,\r\n    \"pinPort\": 0,\r\n    \"recordLimit4Search\": null,\r\n    \"sapmAccounts\": [\r\n        {\r\n            \"dbId\": 805612\r\n        }\r\n    ],\r\n    \"sapmGroups\": [\r\n        {\r\n            \"dbId\": 962211,\r\n            \"id\": \"da5a8bd7-98c0-4fb6-a0ad-be9c8bb2a1f0\",\r\n            \"name\": \"SapmGroup\"\r\n        }\r\n    ],\r\n    \"securityLevel\": \"BASIC\",\r\n    \"token\": \"939d701e-6db4-4e91-8c73-a702e657bbb1\"\r\n}",
          "description": ""
        }
      ],
      "formDataParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "<p>Add AAPM Account - Bound to a single account</p>",
        "jsonExample": "{\n    \"dbId\": 765937,\n    \"applicationName\": \"New Aapm Account\",\n    \"applicationIps\": [\n        \"10.10.10.10/0\"\n    ],\n    \"token\": \"ab23f990-1c37-43b9-8e85-6de2b25ec0f0\",\n    \"expiryDate\": 1623238642873,\n    \"lastAccessTime\": null,\n    \"osType\": null,\n    \"osCredentialType\": null,\n    \"osCredentialSAPM\": null,\n    \"osCredentialSecretDataVault\": null,\n    \"appHash\": \"\",\n    \"appPath\": \"\",\n    \"pinPort\": 0,\n    \"securityLevel\": \"BASIC\",\n    \"hashAlgorithmType\": \"MD5\",\n    \"manuelUserName\": \"\",\n    \"manuelPassword\": null,\n    \"maxUsageCount\": null,\n    \"numberOfUsage\": 0,\n    \"activeUsageLimitation\": false,\n    \"activeTimeLimitation\": false,\n    \"allowListingAccounts\": false,\n    \"addEventUser\": true,\n    \"eventUserEid\": \"admin\",\n    \"sapmAccounts\": [\n        {\n            \"dbId\": 765863,\n            \"device\": null,\n            \"secretName\": null,\n            \"config\": null,\n            \"changePeriod\": null,\n            \"username\": null,\n            \"description\": null,\n            \"secretNotes\": null,\n            \"password\": null,\n            \"previousPassword\": null,\n            \"lastChangeTime\": null,\n            \"nextChangeTime\": null,\n            \"nextChangeTimeStart4Search\": null,\n            \"nextChangeTimeEnd4Search\": null,\n            \"passwordSeenStatus\": null,\n            \"validationStatus\": null,\n            \"changeStatus\": null,\n            \"lastAttemptStatus\": null,\n            \"masterAccountId\": null,\n            \"permissions\": [],\n            \"newPermission\": [],\n            \"permissionToDelete\": [],\n            \"groupManagerToDelete\": null,\n            \"identicalSapmAccounts\": [],\n            \"recordLimit4Search\": null,\n            \"validationStatus4Search\": null,\n            \"checkPermission4Search\": true,\n            \"acceptedSapmConfigList\": null,\n            \"searchOnlyMasterAccounts\": false,\n            \"searchOnlyOwnRegion\": false,\n            \"deviceIp4Search\": null,\n            \"secondPartSeenUsername\": null,\n            \"firstPartSeenUsername\": null,\n            \"errorMessage\": null,\n            \"successful\": true,\n            \"parentSapmGroup\": null,\n            \"parentSapmName4Search\": null,\n            \"secretType\": null,\n            \"owner\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"managers\": [],\n            \"newGroupManager\": null,\n            \"userPermissionLevel\": -2147483648,\n            \"privateType\": null,\n            \"approvalStatus\": null,\n            \"parentSapmGroupDbId\": null,\n            \"groupFullPath\": null,\n            \"isExactMatch4Search\": null,\n            \"approvedBy\": null,\n            \"approvedDate\": null,\n            \"getFullPermissionUser\": false,\n            \"getReadWritePermissionOrAboveUser\": false,\n            \"skipFillPermission\": false,\n            \"sqlSearchSapmParent\": [],\n            \"advancedSearchInput\": null,\n            \"listOfAccountToSearch\": [],\n            \"firstResult\": null,\n            \"maxResult\": null,\n            \"notificationGroups\": [],\n            \"notificationGroupToDelete\": null,\n            \"newNotificationGroup\": null,\n            \"approvalRequired\": false,\n            \"exactMatch4Search\": false,\n            \"changePeriodFormatted\": \"00d 00h 00m\",\n            \"manager\": false,\n            \"masterAccountId4Search\": null,\n            \"accountWithDynamicStrategy\": false\n        }\n    ],\n    \"sapmGroups\": [],\n    \"sapmAccount4Search\": null,\n    \"eventUserId\": null,\n    \"securityLevelString\": null,\n    \"osTypeString\": null,\n    \"osCredentialTypeString\": null,\n    \"osCredentialSAPMLong\": null,\n    \"osCredentialSecretDataVaultLong\": null,\n    \"hashAlgorithmTypeString\": null,\n    \"recordLimit4Search\": null,\n    \"password\": null,\n    \"userName\": null\n}"
      }
    ],
    "contentType": "application/json",
    "description": "<p>This API enables to create new AAPM accounts and edit existing ones. To create new account, db id value should be empty. To edit existing accounts, db id parameter of existing account shoould be filled.</p>",
    "examples": {
      "languages": [
        {
          "id": "DgJc22J7ptoNh3zhv7SMA",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url {{url}}/aioc-rest-web/rest/aapm/addAapmAccount \\\n     --header 'accept: application/json'"
        },
        {
          "id": "9CAO5snD7BVKrYJoI1_fV",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"{{url}}/aioc-rest-web/rest/aapm/addAapmAccount\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "3nx1kJDJfEPtApdXMznjQ",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"{{url}}/aioc-rest-web/rest/aapm/addAapmAccount\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "xprjksO3DG04B9VZYIZwd",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"{{url}}/aioc-rest-web/rest/aapm/addAapmAccount\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "DgJc22J7ptoNh3zhv7SMA"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "{\n    \"dbId\": 765937,\n    \"applicationName\": \"New Aapm Account\",\n    \"applicationIps\": [\n        \"10.10.10.10/0\"\n    ],\n    \"token\": \"ab23f990-1c37-43b9-8e85-6de2b25ec0f0\",\n    \"expiryDate\": 1623238642873,\n    \"lastAccessTime\": null,\n    \"osType\": null,\n    \"osCredentialType\": null,\n    \"osCredentialSAPM\": null,\n    \"osCredentialSecretDataVault\": null,\n    \"appHash\": \"\",\n    \"appPath\": \"\",\n    \"pinPort\": 0,\n    \"securityLevel\": \"BASIC\",\n    \"hashAlgorithmType\": \"MD5\",\n    \"manuelUserName\": \"\",\n    \"manuelPassword\": null,\n    \"maxUsageCount\": null,\n    \"numberOfUsage\": 0,\n    \"activeUsageLimitation\": false,\n    \"activeTimeLimitation\": false,\n    \"allowListingAccounts\": false,\n    \"addEventUser\": true,\n    \"eventUserEid\": \"admin\",\n    \"sapmAccounts\": [\n        {\n            \"dbId\": 765863,\n            \"device\": null,\n            \"secretName\": null,\n            \"config\": null,\n            \"changePeriod\": null,\n            \"username\": null,\n            \"description\": null,\n            \"secretNotes\": null,\n            \"password\": null,\n            \"previousPassword\": null,\n            \"lastChangeTime\": null,\n            \"nextChangeTime\": null,\n            \"nextChangeTimeStart4Search\": null,\n            \"nextChangeTimeEnd4Search\": null,\n            \"passwordSeenStatus\": null,\n            \"validationStatus\": null,\n            \"changeStatus\": null,\n            \"lastAttemptStatus\": null,\n            \"masterAccountId\": null,\n            \"permissions\": [],\n            \"newPermission\": [],\n            \"permissionToDelete\": [],\n            \"groupManagerToDelete\": null,\n            \"identicalSapmAccounts\": [],\n            \"recordLimit4Search\": null,\n            \"validationStatus4Search\": null,\n            \"checkPermission4Search\": true,\n            \"acceptedSapmConfigList\": null,\n            \"searchOnlyMasterAccounts\": false,\n            \"searchOnlyOwnRegion\": false,\n            \"deviceIp4Search\": null,\n            \"secondPartSeenUsername\": null,\n            \"firstPartSeenUsername\": null,\n            \"errorMessage\": null,\n            \"successful\": true,\n            \"parentSapmGroup\": null,\n            \"parentSapmName4Search\": null,\n            \"secretType\": null,\n            \"owner\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"managers\": [],\n            \"newGroupManager\": null,\n            \"userPermissionLevel\": -2147483648,\n            \"privateType\": null,\n            \"approvalStatus\": null,\n            \"parentSapmGroupDbId\": null,\n            \"groupFullPath\": null,\n            \"isExactMatch4Search\": null,\n            \"approvedBy\": null,\n            \"approvedDate\": null,\n            \"getFullPermissionUser\": false,\n            \"getReadWritePermissionOrAboveUser\": false,\n            \"skipFillPermission\": false,\n            \"sqlSearchSapmParent\": [],\n            \"advancedSearchInput\": null,\n            \"listOfAccountToSearch\": [],\n            \"firstResult\": null,\n            \"maxResult\": null,\n            \"notificationGroups\": [],\n            \"notificationGroupToDelete\": null,\n            \"newNotificationGroup\": null,\n            \"approvalRequired\": false,\n            \"exactMatch4Search\": false,\n            \"changePeriodFormatted\": \"00d 00h 00m\",\n            \"manager\": false,\n            \"masterAccountId4Search\": null,\n            \"accountWithDynamicStrategy\": false\n        }\n    ],\n    \"sapmGroups\": [],\n    \"sapmAccount4Search\": null,\n    \"eventUserId\": null,\n    \"securityLevelString\": null,\n    \"osTypeString\": null,\n    \"osCredentialTypeString\": null,\n    \"osCredentialSAPMLong\": null,\n    \"osCredentialSecretDataVaultLong\": null,\n    \"hashAlgorithmTypeString\": null,\n    \"recordLimit4Search\": null,\n    \"password\": null,\n    \"userName\": null\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "type": "api-oas-v2",
  "children": [
    {
      "text": ""
    }
  ]
}