---
title: Assigned Credential
slug: singleconnect-2-16/assigned-credential
description: This document offers code examples in C#, curl, and JavaScript for searching and deleting SAPM Account ID data, assigned credentials, and secret data vaults. It provides insight into users, devices, configurations, and password change details. Learn how t
docTags: 
createdAt: 2021-02-25T23:53:06.000Z
---



:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search",
  "name": "Search SAPM Account ID",
  "method": "GET",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "rtsjDkGp4FxJIX20S2Fqn",
        "code": "[\n    {\n        \"dbId\": 4979851,\n        \"assignedCredentialUser\": {\n            \"id\": \"25e53f47-ce66-4df2-9abc-6961dc668264\",\n            \"eid\": \"admin\",\n            \"personelId\": null,\n            \"name\": \"Administrator\",\n            \"passwordAlgorithm\": null,\n            \"password\": \"f0b33b0821f883caf74c8d855c2ea996\",\n            \"email\": \"admin@kron.com.tr\",\n            \"surname\": \"Administrator\",\n            \"internal\": true,\n            \"properties\": {\n                \"ubaThreshold\": \"50\"\n            },\n            \"groups\": [\n                \"DEFAULT_GROUP_SYSYEM_USERS\",\n                \"DEFAULT_GROUP_SYSYEM_ADMINS\"\n            ],\n            \"managerGroups\": [\n                \"DEFAULT_GROUP_SYSYEM_ADMINS\"\n            ],\n            \"lastLogin\": 1606086958775,\n            \"lastLoginIp\": \"0:0:0:0:0:0:0:1\",\n            \"groupPropertyKey4Search\": null,\n            \"groupPropertyValue4Search\": null,\n            \"recordLimit4Search\": null,\n            \"passwordDirty\": false,\n            \"passwordAutoGenerated\": false,\n            \"filterFunctionName\": null,\n            \"filterMembershipUserId\": null,\n            \"filterManagerId\": null,\n            \"filterEidList\": null,\n            \"filterManagerOfUserId\": null,\n            \"tempUser\": false,\n            \"tempUserStartTime\": null,\n            \"tempUserEndTime\": null,\n            \"phoneNumber\": null,\n            \"forceChangePasswordOnNextLogin\": false,\n            \"lockReason\": null,\n            \"unlockOnPasswordChanged\": false,\n            \"unlockTime\": null,\n            \"externalDirectorySource\": null,\n            \"userPropertyKey4Search\": null,\n            \"userPropertyValue4Search\": null,\n            \"locked\": false\n        },\n        \"credentialSource\": \"SAPM\",\n        \"sapmAccount\": {\n            \"dbId\": 566585,\n            \"device\": {\n                \"dbId\": 1,\n                \"id\": \"127.0.0.1\",\n                \"name\": \"127.0.0.1\",\n                \"accessProtocol\": \"SSHv2\",\n                \"managementIp\": \"127.0.0.1\",\n                \"elementType\": {\n                    \"dbId\": 203638,\n                    \"elementTypeId\": \"sc_proxy\",\n                    \"elementTypeName\": \"SC PROXY\",\n                    \"vendor\": null,\n                    \"category\": null,\n                    \"elementTypeProperties\": []\n                },\n                \"discoveryTime\": 1530205124000,\n                \"properties\": {\n                    \"hostname\": \"127.0.0.1\",\n                    \"pseudoDevice\": \"true\"\n                },\n                \"deviceGroups\": [\n                    \"dg.sc_proxy\"\n                ],\n                \"availability\": null,\n                \"currentMaintenanceWindow\": null,\n                \"interfaceName\": null,\n                \"nameManagementIp\": \"127.0.0.1-127.0.0.1\",\n                \"regionName\": null,\n                \"filterRecordLimit\": null,\n                \"filterSearchPhrase\": null,\n                \"filterGroupId\": null,\n                \"filterRoleGroupIds\": null,\n                \"filterOnlyUnassignedDevices\": null,\n                \"pseudoDevice\": true,\n                \"portNum\": null,\n                \"domainController\": null,\n                \"discoverySource\": null\n            },\n            \"config\": {\n                \"configId\": -9077,\n                \"name\": \"Linux\",\n                \"description\": \"Linux\",\n                \"strategy\": \"SSH\",\n                \"properties\": {\n                    \"new.user.found.action\": \"LOG\",\n                    \"username.parser\": \"(.*?):.*\",\n                    \"change.password.command.template\": \"passwd\\\\n${oldPassword}\\\\n${newPassword}\\\\n${newPassword}\\\\nlogout\",\n                    \"user.list.command\": \"cat /etc/passwd\"\n                },\n                \"exactMatch4Search\": false,\n                \"recordLimit4Search\": null\n            },\n            \"changePeriod\": 28800,\n            \"username\": \"kron1\",\n            \"password\": \"0E4PzY2ByShg26PoZSbfJA==\",\n            \"previousPassword\": \"3HxMdrxt1OlKI/cBlhei5g==\",\n            \"lastChangeTime\": 1604823540077,\n            \"nextChangeTime\": 1606551540077,\n            \"nextChangeTimeStart4Search\": null,\n            \"nextChangeTimeEnd4Search\": null,\n            \"passwordSeenStatus\": \"UNSEEN\",\n            \"validationStatus\": \"VALID\",\n            \"changeStatus\": null,\n            \"lastAttemptStatus\": true,\n            \"masterAccountId\": null,\n            \"permissions\": {},\n            \"identicalSapmAccounts\": [],\n            \"recordLimit4Search\": null,\n            \"validationStatus4Search\": null,\n            \"checkPermission4Search\": true,\n            \"exactMatch4Search\": false,\n            \"acceptedSapmConfigList\": null,\n            \"masterAccountId4Search\": null,\n            \"searchOnlyMasterAccounts\": false,\n            \"searchOnlyOwnRegion\": false,\n            \"deviceIp4Search\": null,\n            \"secondPartSeenUsername\": null,\n            \"firstPartSeenUsername\": null,\n            \"errorMessage\": null,\n            \"successful\": true,\n            \"changePeriodFormatted\": \"20d 00h 00m\"\n        },\n        \"secretDataVault\": null,\n        \"device\": null,\n        \"deviceGroup\": null,\n        \"recordLimit4Search\": null\n    },\n    {\n        \"dbId\": 7268915,\n        \"assignedCredentialUser\": {\n            \"id\": \"65646c8a-21f1-4f6e-8a3e-50f89c54ad39\",\n            \"eid\": \"test\",\n            \"personelId\": null,\n            \"name\": \"test\",\n            \"passwordAlgorithm\": \"MD5\",\n            \"password\": \"996b67f0bb66b6c87ed4b9d880c00501\",\n            \"email\": \"test@test.com\",\n            \"surname\": \"test\",\n            \"internal\": true,\n            \"properties\": {\n                \"ubaThreshold\": \"50\"\n            },\n            \"groups\": [\n                \"DEFAULT_GROUP_SYSYEM_USERS\"\n            ],\n            \"managerGroups\": [],\n            \"lastLogin\": null,\n            \"lastLoginIp\": null,\n            \"groupPropertyKey4Search\": null,\n            \"groupPropertyValue4Search\": null,\n            \"recordLimit4Search\": null,\n            \"passwordDirty\": false,\n            \"passwordAutoGenerated\": false,\n            \"filterFunctionName\": null,\n            \"filterMembershipUserId\": null,\n            \"filterManagerId\": null,\n            \"filterEidList\": null,\n            \"filterManagerOfUserId\": null,\n            \"tempUser\": false,\n            \"tempUserStartTime\": null,\n            \"tempUserEndTime\": null,\n            \"phoneNumber\": null,\n            \"forceChangePasswordOnNextLogin\": false,\n            \"lockReason\": null,\n            \"unlockOnPasswordChanged\": false,\n            \"unlockTime\": null,\n            \"externalDirectorySource\": null,\n            \"userPropertyKey4Search\": null,\n            \"userPropertyValue4Search\": null,\n            \"locked\": false\n        },\n        \"credentialSource\": \"SAPM\",\n        \"sapmAccount\": {\n            \"dbId\": 566585,\n            \"device\": {\n                \"dbId\": 1,\n                \"id\": \"127.0.0.1\",\n                \"name\": \"127.0.0.1\",\n                \"accessProtocol\": \"SSHv2\",\n                \"managementIp\": \"127.0.0.1\",\n                \"elementType\": {\n                    \"dbId\": 203638,\n                    \"elementTypeId\": \"sc_proxy\",\n                    \"elementTypeName\": \"SC PROXY\",\n                    \"vendor\": null,\n                    \"category\": null,\n                    \"elementTypeProperties\": []\n                },\n                \"discoveryTime\": 1530205124000,\n                \"properties\": {\n                    \"hostname\": \"127.0.0.1\",\n                    \"pseudoDevice\": \"true\"\n                },\n                \"deviceGroups\": [\n                    \"dg.sc_proxy\"\n                ],\n                \"availability\": null,\n                \"currentMaintenanceWindow\": null,\n                \"interfaceName\": null,\n                \"nameManagementIp\": \"127.0.0.1-127.0.0.1\",\n                \"regionName\": null,\n                \"filterRecordLimit\": null,\n                \"filterSearchPhrase\": null,\n                \"filterGroupId\": null,\n                \"filterRoleGroupIds\": null,\n                \"filterOnlyUnassignedDevices\": null,\n                \"pseudoDevice\": true,\n                \"portNum\": null,\n                \"domainController\": null,\n                \"discoverySource\": null\n            },\n            \"config\": {\n                \"configId\": -9077,\n                \"name\": \"Linux\",\n                \"description\": \"Linux\",\n                \"strategy\": \"SSH\",\n                \"properties\": {\n                    \"new.user.found.action\": \"LOG\",\n                    \"username.parser\": \"(.*?):.*\",\n                    \"change.password.command.template\": \"passwd\\\\n${oldPassword}\\\\n${newPassword}\\\\n${newPassword}\\\\nlogout\",\n                    \"user.list.command\": \"cat /etc/passwd\"\n                },\n                \"exactMatch4Search\": false,\n                \"recordLimit4Search\": null\n            },\n            \"changePeriod\": 28800,\n            \"username\": \"kron1\",\n            \"password\": \"0E4PzY2ByShg26PoZSbfJA==\",\n            \"previousPassword\": \"3HxMdrxt1OlKI/cBlhei5g==\",\n            \"lastChangeTime\": 1604823540077,\n            \"nextChangeTime\": 1606551540077,\n            \"nextChangeTimeStart4Search\": null,\n            \"nextChangeTimeEnd4Search\": null,\n            \"passwordSeenStatus\": \"UNSEEN\",\n            \"validationStatus\": \"VALID\",\n            \"changeStatus\": null,\n            \"lastAttemptStatus\": true,\n            \"masterAccountId\": null,\n            \"permissions\": {},\n            \"identicalSapmAccounts\": [],\n            \"recordLimit4Search\": null,\n            \"validationStatus4Search\": null,\n            \"checkPermission4Search\": true,\n            \"exactMatch4Search\": false,\n            \"acceptedSapmConfigList\": null,\n            \"masterAccountId4Search\": null,\n            \"searchOnlyMasterAccounts\": false,\n            \"searchOnlyOwnRegion\": false,\n            \"deviceIp4Search\": null,\n            \"secondPartSeenUsername\": null,\n            \"firstPartSeenUsername\": null,\n            \"errorMessage\": null,\n            \"successful\": true,\n            \"changePeriodFormatted\": \"20d 00h 00m\"\n        },\n        \"secretDataVault\": null,\n        \"device\": null,\n        \"deviceGroup\": null,\n        \"recordLimit4Search\": null\n    }\n]",
        "language": "200"
      },
      {
        "id": "g2ZAtBeMWmqQLOd2Zx89s",
        "code": "You cannot search the SAPM and Secret Vault Data at the same time.",
        "language": "400"
      }
    ],
    "selectedLanguageId": "rtsjDkGp4FxJIX20S2Fqn"
  },
  "examples": {
    "languages": [
      {
        "id": "ZUvXVSNRwnaYX8WFZbnc_",
        "code": "var client = new RestClient(\"http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search?sapmAccountId=566585\");\r\nclient.Timeout = -1;\r\nvar request = new RestRequest(Method.GET);\r\nrequest.AddHeader(\"Content-Type\", \"application/json\");\r\nIRestResponse response = client.Execute(request);\r\nConsole.WriteLine(response.Content);",
        "language": "csharp"
      },
      {
        "id": "B32gtzDOE0ZtXc2AwTyqs",
        "code": "curl --location -g --request GET 'http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search?sapmAccountId=566585' \\\n--header 'Content-Type: application/json'",
        "language": "curl"
      },
      {
        "id": "1HjQmi_zgx4g8C2YjrxwX",
        "code": "var settings = {\r\n  \"url\": \"http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search?sapmAccountId=566585\",\r\n  \"method\": \"GET\",\r\n  \"timeout\": 0,\r\n  \"headers\": {\r\n    \"Content-Type\": \"application/json\"\r\n  },\r\n};\r\n\r\n$.ajax(settings).done(function (response) {\r\n  console.log(response);\r\n});",
        "language": "javascript"
      }
    ],
    "selectedLanguageId": "ZUvXVSNRwnaYX8WFZbnc_"
  },
  "description": " ",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search?userId=68f84f67-3ad2-47c3-80cd-dda69fd327e3&source=SECRET_DATA_VAULT",
  "name": "Search By User Id and Cred. Source",
  "method": "GET",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "qVL8g-_A02xqM7NqA6heg",
        "code": "[\n    {\n        \"dbId\": 1777540,\n        \"assignedCredentialUser\": {\n            \"id\": \"68f84f67-3ad2-47c3-80cd-dda69fd327e3\",\n            \"eid\": \"test\",\n            \"personelId\": \"1\",\n            \"name\": \"test\",\n            \"passwordAlgorithm\": \"MD5\",\n            \"password\": \"c4ca4238a0b923820dcc509a6f75849b\",\n            \"email\": \"test@kron.com.tr\",\n            \"surname\": \"test\",\n            \"internal\": true,\n            \"properties\": {\n                \"ubaThreshold\": \"50\"\n            },\n            \"groups\": [\n                \"DEFAULT_GROUP_SYSYEM_USERS\",\n                \"5a91c44f-30fc-450c-b913-ce5437f33f33\"\n            ],\n            \"managerGroups\": [\n                \"5a91c44f-30fc-450c-b913-ce5437f33f33\"\n            ],\n            \"lastLogin\": 1605091187945,\n            \"lastLoginIp\": \"10.xx.xx.xx\",\n            \"groupPropertyKey4Search\": null,\n            \"groupPropertyValue4Search\": null,\n            \"recordLimit4Search\": null,\n            \"passwordDirty\": false,\n            \"passwordAutoGenerated\": false,\n            \"filterFunctionName\": null,\n            \"filterMembershipUserId\": null,\n            \"filterManagerId\": null,\n            \"filterEidList\": null,\n            \"filterManagerOfUserId\": null,\n            \"tempUser\": false,\n            \"tempUserStartTime\": null,\n            \"tempUserEndTime\": null,\n            \"phoneNumber\": null,\n            \"forceChangePasswordOnNextLogin\": false,\n            \"lockReason\": null,\n            \"unlockOnPasswordChanged\": false,\n            \"unlockTime\": null,\n            \"externalDirectorySource\": null,\n            \"userPropertyKey4Search\": null,\n            \"userPropertyValue4Search\": null,\n            \"locked\": false\n        },\n        \"credentialSource\": \"SECRET_DATA_VAULT\",\n        \"sapmAccount\": null,\n        \"secretDataVault\": {\n            \"dbId\": 1777537,\n            \"name\": \"windows\",\n            \"description\": null,\n            \"type\": \"USER_CREDENTIAL\",\n            \"ipAddress\": \"10.xx.xx.xx\",\n            \"secretData\": \"oOWJqvoUIvVvZIdzeAtKeQ==\",\n            \"secretData2\": null,\n            \"permissions\": {},\n            \"userCreate\": \"admin\",\n            \"username\": \"sercan\",\n            \"errorMessage\": null,\n            \"successful\": true,\n            \"privateType\": \"NO\",\n            \"userPermissionLevel\": null\n        },\n        \"device\": {\n            \"dbId\": 510313,\n            \"id\": \"4eef1637-1dee-429d-92f0-860b8193bde5\",\n            \"name\": \"windows-test\",\n            \"accessProtocol\": \"RDP\",\n            \"managementIp\": \"10.xx.xx.xx\",\n            \"elementType\": {\n                \"dbId\": -123,\n                \"elementTypeId\": \"windows\",\n                \"elementTypeName\": \"Windows\",\n                \"vendor\": null,\n                \"category\": null,\n                \"elementTypeProperties\": []\n            },\n            \"discoveryTime\": 1581502986745,\n            \"properties\": {\n                \"remoteDesktop.server-layout\": \"tr-tr-qwerty\",\n                \"remoteDesktop.security\": \"any\",\n                \"pseudoDevice\": \"true\",\n                \"remoteDesktop.enable-printing\": \"true\",\n                \"remoteDesktop.enable-drive\": \"true\",\n                \"remoteDesktop.ignore-cert\": \"true\"\n            },\n            \"deviceGroups\": [\n                \"99a7a80d-cf62-440f-a9eb-3e99eb0539bc\"\n            ],\n            \"availability\": null,\n            \"currentMaintenanceWindow\": null,\n            \"interfaceName\": null,\n            \"nameManagementIp\": \"windows-test-10.xx.xx.xx\",\n            \"regionName\": null,\n            \"filterRecordLimit\": null,\n            \"filterSearchPhrase\": null,\n            \"filterGroupId\": null,\n            \"filterRoleGroupIds\": null,\n            \"filterOnlyUnassignedDevices\": null,\n            \"pseudoDevice\": true,\n            \"portNum\": null,\n            \"domainController\": null,\n            \"discoverySource\": null\n        },\n        \"deviceGroup\": null,\n        \"recordLimit4Search\": null\n    }\n]",
        "language": "200"
      },
      {
        "id": "-dwcuG8Vzk1nwVYqwoERm",
        "code": "You cannot search the SAPM and Secret Vault Data at the same time.",
        "language": "400"
      }
    ],
    "selectedLanguageId": "qVL8g-_A02xqM7NqA6heg"
  },
  "examples": {
    "languages": [
      {
        "id": "yYyNvWSpsulbIZacEQoRN",
        "code": "var client = new RestClient(\"http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search?userId=68f84f67-3ad2-47c3-80cd-dda69fd327e3&source=SECRET_DATA_VAULT\");\r\nclient.Timeout = -1;\r\nvar request = new RestRequest(Method.GET);\r\nrequest.AddHeader(\"Content-Type\", \"application/json\");\r\nIRestResponse response = client.Execute(request);\r\nConsole.WriteLine(response.Content);",
        "language": "csharp"
      },
      {
        "id": "djiYQp6dPrBpyE9IyEk8K",
        "code": "curl --location -g --request GET 'http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search?userId=68f84f67-3ad2-47c3-80cd-dda69fd327e3&source=SECRET_DATA_VAULT' \\\n--header 'Content-Type: application/json'",
        "language": "curl"
      },
      {
        "id": "sZ1m6tbbZoQc7jh7e--Oe",
        "code": "var settings = {\r\n  \"url\": \"http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search?userId=68f84f67-3ad2-47c3-80cd-dda69fd327e3&source=SECRET_DATA_VAULT\",\r\n  \"method\": \"GET\",\r\n  \"timeout\": 0,\r\n  \"headers\": {\r\n    \"Content-Type\": \"application/json\"\r\n  },\r\n};\r\n\r\n$.ajax(settings).done(function (response) {\r\n  console.log(response);\r\n});",
        "language": "javascript"
      }
    ],
    "selectedLanguageId": "yYyNvWSpsulbIZacEQoRN"
  },
  "description": " ",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::



:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search?secretVaultId=1777537&userId=65646c8a-21f1-4f6e-8a3e-50f89c54ad39&deviceOrDeviceGroupId=4eef1637-1dee-429d-92f0-860b8193bde5",
  "name": "Search By User Id and Secret Data Vault Id - Device or Device Group Id",
  "method": "GET",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "MMLLV8aSI4pLmECIz3imS",
        "code": "[\n    {\n        \"dbId\": 7268971,\n        \"assignedCredentialUser\": {\n            \"id\": \"65646c8a-21f1-4f6e-8a3e-50f89c54ad39\",\n            \"eid\": \"test\",\n            \"personelId\": null,\n            \"name\": \"test\",\n            \"passwordAlgorithm\": \"MD5\",\n            \"password\": \"996b67f0bb66b6c87ed4b9d880c00501\",\n            \"email\": \"test@test.com\",\n            \"surname\": \"test\",\n            \"internal\": true,\n            \"properties\": {\n                \"ubaThreshold\": \"50\"\n            },\n            \"groups\": [\n                \"DEFAULT_GROUP_SYSYEM_USERS\"\n            ],\n            \"managerGroups\": [],\n            \"lastLogin\": null,\n            \"lastLoginIp\": null,\n            \"groupPropertyKey4Search\": null,\n            \"groupPropertyValue4Search\": null,\n            \"recordLimit4Search\": null,\n            \"passwordDirty\": false,\n            \"passwordAutoGenerated\": false,\n            \"filterFunctionName\": null,\n            \"filterMembershipUserId\": null,\n            \"filterManagerId\": null,\n            \"filterEidList\": null,\n            \"filterManagerOfUserId\": null,\n            \"tempUser\": false,\n            \"tempUserStartTime\": null,\n            \"tempUserEndTime\": null,\n            \"phoneNumber\": null,\n            \"forceChangePasswordOnNextLogin\": false,\n            \"lockReason\": null,\n            \"unlockOnPasswordChanged\": false,\n            \"unlockTime\": null,\n            \"externalDirectorySource\": null,\n            \"userPropertyKey4Search\": null,\n            \"userPropertyValue4Search\": null,\n            \"locked\": false\n        },\n        \"credentialSource\": \"SECRET_DATA_VAULT\",\n        \"sapmAccount\": null,\n        \"secretDataVault\": {\n            \"dbId\": 1777537,\n            \"name\": \"windows\",\n            \"description\": null,\n            \"type\": \"USER_CREDENTIAL\",\n            \"ipAddress\": \"10.xx.xx.xx\",\n            \"secretData\": \"oOWJqvoUIvVvZIdzeAtKeQ==\",\n            \"secretData2\": null,\n            \"permissions\": {},\n            \"userCreate\": \"admin\",\n            \"username\": \"test\",\n            \"errorMessage\": null,\n            \"successful\": true,\n            \"privateType\": \"NO\",\n            \"userPermissionLevel\": null\n        },\n        \"device\": null,\n        \"deviceGroup\": null,\n        \"recordLimit4Search\": null\n    }\n]",
        "language": "200"
      }
    ],
    "selectedLanguageId": "MMLLV8aSI4pLmECIz3imS"
  },
  "examples": {
    "languages": [
      {
        "id": "TB74_J5bKp5RJwQJZLBdB",
        "code": "var client = new RestClient(\"http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search?secretVaultId=1777537&userId=65646c8a-21f1-4f6e-8a3e-50f89c54ad39&deviceOrDeviceGroupId=4eef1637-1dee-429d-92f0-860b8193bde5\");\r\nclient.Timeout = -1;\r\nvar request = new RestRequest(Method.GET);\r\nrequest.AddHeader(\"Content-Type\", \"application/json\");\r\nIRestResponse response = client.Execute(request);\r\nConsole.WriteLine(response.Content);",
        "language": "csharp"
      },
      {
        "id": "njCjUZV6-HTLhsXxbsu12",
        "code": "curl --location -g --request GET 'http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search?secretVaultId=1777537&userId=65646c8a-21f1-4f6e-8a3e-50f89c54ad39&deviceOrDeviceGroupId=4eef1637-1dee-429d-92f0-860b8193bde5' \\\n--header 'Content-Type: application/json'",
        "language": "curl"
      },
      {
        "id": "0kqJkm9NA32GufRjyMdwK",
        "code": "var settings = {\r\n  \"url\": \"http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search?secretVaultId=1777537&userId=65646c8a-21f1-4f6e-8a3e-50f89c54ad39&deviceOrDeviceGroupId=4eef1637-1dee-429d-92f0-860b8193bde5\",\r\n  \"method\": \"GET\",\r\n  \"timeout\": 0,\r\n  \"headers\": {\r\n    \"Content-Type\": \"application/json\"\r\n  },\r\n};\r\n\r\n$.ajax(settings).done(function (response) {\r\n  console.log(response);\r\n});",
        "language": "javascript"
      }
    ],
    "selectedLanguageId": "TB74_J5bKp5RJwQJZLBdB"
  },
  "description": " ",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::



:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "http://{{hostname}}/aioc-rest-web/rest/assignedCredential/delete?id=7383274",
  "name": "Delete",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "8BsMPs2xVkLUMpb3znabx",
        "code": "    {\n        \"dbId\": 7268915,\n        \"assignedCredentialUser\": {\n            \"id\": \"65646c8a-21f1-4f6e-8a3e-50f89c54ad39\",\n            \"eid\": \"test\",\n            \"personelId\": null,\n            \"name\": \"test\",\n            \"passwordAlgorithm\": \"MD5\",\n            \"password\": \"996b67f0bb66b6c87ed4b9d880c00501\",\n            \"email\": \"test@test.com\",\n            \"surname\": \"test\",\n            \"internal\": true,\n            \"properties\": {\n                \"ubaThreshold\": \"50\"\n            },\n            \"groups\": [\n                \"DEFAULT_GROUP_SYSYEM_USERS\"\n            ],\n            \"managerGroups\": [],\n            \"lastLogin\": null,\n            \"lastLoginIp\": null,\n            \"groupPropertyKey4Search\": null,\n            \"groupPropertyValue4Search\": null,\n            \"recordLimit4Search\": null,\n            \"passwordDirty\": false,\n            \"passwordAutoGenerated\": false,\n            \"filterFunctionName\": null,\n            \"filterMembershipUserId\": null,\n            \"filterManagerId\": null,\n            \"filterEidList\": null,\n            \"filterManagerOfUserId\": null,\n            \"tempUser\": false,\n            \"tempUserStartTime\": null,\n            \"tempUserEndTime\": null,\n            \"phoneNumber\": null,\n            \"forceChangePasswordOnNextLogin\": false,\n            \"lockReason\": null,\n            \"unlockOnPasswordChanged\": false,\n            \"unlockTime\": null,\n            \"externalDirectorySource\": null,\n            \"userPropertyKey4Search\": null,\n            \"userPropertyValue4Search\": null,\n            \"locked\": false\n        },\n        \"credentialSource\": \"SAPM\",\n        \"sapmAccount\": {\n            \"dbId\": 566585,\n            \"device\": {\n                \"dbId\": 1,\n                \"id\": \"127.0.0.1\",\n                \"name\": \"127.0.0.1\",\n                \"accessProtocol\": \"SSHv2\",\n                \"managementIp\": \"127.0.0.1\",\n                \"elementType\": {\n                    \"dbId\": 203638,\n                    \"elementTypeId\": \"sc_proxy\",\n                    \"elementTypeName\": \"SC PROXY\",\n                    \"vendor\": null,\n                    \"category\": null,\n                    \"elementTypeProperties\": []\n                },\n                \"discoveryTime\": 1530205124000,\n                \"properties\": {\n                    \"hostname\": \"127.0.0.1\",\n                    \"pseudoDevice\": \"true\"\n                },\n                \"deviceGroups\": [\n                    \"dg.sc_proxy\"\n                ],\n                \"availability\": null,\n                \"currentMaintenanceWindow\": null,\n                \"interfaceName\": null,\n                \"nameManagementIp\": \"127.0.0.1-127.0.0.1\",\n                \"regionName\": null,\n                \"filterRecordLimit\": null,\n                \"filterSearchPhrase\": null,\n                \"filterGroupId\": null,\n                \"filterRoleGroupIds\": null,\n                \"filterOnlyUnassignedDevices\": null,\n                \"pseudoDevice\": true,\n                \"domainController\": null,\n                \"portNum\": null,\n                \"discoverySource\": null\n            },\n            \"config\": {\n                \"configId\": -9077,\n                \"name\": \"Linux\",\n                \"description\": \"Linux\",\n                \"strategy\": \"SSH\",\n                \"properties\": {\n                    \"new.user.found.action\": \"LOG\",\n                    \"username.parser\": \"(.*?):.*\",\n                    \"change.password.command.template\": \"passwd\\\\n${oldPassword}\\\\n${newPassword}\\\\n${newPassword}\\\\nlogout\",\n                    \"user.list.command\": \"cat /etc/passwd\"\n                },\n                \"exactMatch4Search\": false,\n                \"recordLimit4Search\": null\n            },\n            \"changePeriod\": 28800,\n            \"username\": \"kron1\",\n            \"password\": \"0E4PzY2ByShg26PoZSbfJA==\",\n            \"previousPassword\": \"3HxMdrxt1OlKI/cBlhei5g==\",\n            \"lastChangeTime\": 1604823540077,\n            \"nextChangeTime\": 1606551540077,\n            \"nextChangeTimeStart4Search\": null,\n            \"nextChangeTimeEnd4Search\": null,\n            \"passwordSeenStatus\": \"UNSEEN\",\n            \"validationStatus\": \"VALID\",\n            \"changeStatus\": null,\n            \"lastAttemptStatus\": true,\n            \"masterAccountId\": null,\n            \"permissions\": {},\n            \"identicalSapmAccounts\": [],\n            \"recordLimit4Search\": null,\n            \"validationStatus4Search\": null,\n            \"checkPermission4Search\": true,\n            \"exactMatch4Search\": false,\n            \"acceptedSapmConfigList\": null,\n            \"masterAccountId4Search\": null,\n            \"searchOnlyMasterAccounts\": false,\n            \"searchOnlyOwnRegion\": false,\n            \"deviceIp4Search\": null,\n            \"secondPartSeenUsername\": null,\n            \"firstPartSeenUsername\": null,\n            \"errorMessage\": null,\n            \"successful\": true,\n            \"changePeriodFormatted\": \"20d 00h 00m\"\n        },\n        \"secretDataVault\": null,\n        \"device\": null,\n        \"deviceGroup\": null,\n        \"recordLimit4Search\": null\n    }",
        "language": "200"
      },
      {
        "id": "f9eb9n4kNj6JJkzYfrWGL",
        "code": "There is no assigned credential with this id.",
        "language": "400"
      }
    ],
    "selectedLanguageId": "8BsMPs2xVkLUMpb3znabx"
  },
  "examples": {
    "languages": [
      {
        "id": "EesszfbTh708XRY-cUBrX",
        "code": "var client = new RestClient(\"http://{{hostname}}/aioc-rest-web/rest/assignedCredential/delete?id=7383274\");\r\nclient.Timeout = -1;\r\nvar request = new RestRequest(Method.POST);\r\nrequest.AddHeader(\"Content-Type\", \"application/json\");\r\nrequest.AddParameter(\"application/json\", \"{\\n        \\\"dbId\\\": 7268922,\\n        \\\"assignedCredentialUser\\\": {\\n            \\\"id\\\": \\\"65646c8a-21f1-4f6e-8a3e-50f89c54ad39\\\",\\n            \\\"eid\\\": \\\"test\\\",\\n            \\\"personelId\\\": null,\\n            \\\"name\\\": \\\"test\\\",\\n            \\\"passwordAlgorithm\\\": \\\"MD5\\\",\\n            \\\"password\\\": \\\"996b67f0bb66b6c87ed4b9d880c00501\\\",\\n            \\\"email\\\": \\\"test@test.com\\\",\\n            \\\"surname\\\": \\\"test\\\",\\n            \\\"internal\\\": true,\\n            \\\"properties\\\": {\\n                \\\"ubaThreshold\\\": \\\"50\\\"\\n            },\\n            \\\"groups\\\": [\\n                \\\"DEFAULT_GROUP_SYSYEM_USERS\\\"\\n            ],\\n            \\\"managerGroups\\\": [],\\n            \\\"lastLogin\\\": null,\\n            \\\"lastLoginIp\\\": null,\\n            \\\"groupPropertyKey4Search\\\": null,\\n            \\\"groupPropertyValue4Search\\\": null,\\n            \\\"recordLimit4Search\\\": null,\\n            \\\"passwordDirty\\\": false,\\n            \\\"passwordAutoGenerated\\\": false,\\n            \\\"filterFunctionName\\\": null,\\n            \\\"filterMembershipUserId\\\": null,\\n            \\\"filterManagerId\\\": null,\\n            \\\"filterEidList\\\": null,\\n            \\\"filterManagerOfUserId\\\": null,\\n            \\\"tempUser\\\": false,\\n            \\\"tempUserStartTime\\\": null,\\n            \\\"tempUserEndTime\\\": null,\\n            \\\"lockReason\\\": null,\\n            \\\"unlockOnPasswordChanged\\\": false,\\n            \\\"unlockTime\\\": null,\\n            \\\"externalDirectorySource\\\": null,\\n            \\\"userPropertyKey4Search\\\": null,\\n            \\\"userPropertyValue4Search\\\": null,\\n            \\\"phoneNumber\\\": null,\\n            \\\"forceChangePasswordOnNextLogin\\\": false,\\n            \\\"locked\\\": false\\n        },\\n        \\\"credentialSource\\\": \\\"SECRET_DATA_VAULT\\\",\\n        \\\"sapmAccount\\\": null,\\n        \\\"secretDataVault\\\": {\\n            \\\"dbId\\\": 1777537,\\n            \\\"name\\\": \\\"windows_test\\\",\\n            \\\"description\\\": null,\\n            \\\"type\\\": \\\"USER_CREDENTIAL\\\",\\n            \\\"ipAddress\\\": \\\"10.xx.xx.xx\\\",\\n            \\\"secretData\\\": \\\"oOWJqvoUIvVvZIdzeAtKeQ==\\\",\\n            \\\"secretData2\\\": null,\\n            \\\"permissions\\\": {},\\n            \\\"userCreate\\\": \\\"admin\\\",\\n            \\\"username\\\": \\\"test\\\",\\n            \\\"errorMessage\\\": null,\\n            \\\"successful\\\": true,\\n            \\\"privateType\\\": \\\"NO\\\",\\n            \\\"userPermissionLevel\\\": null\\n        },\\n        \\\"deviceGroup\\\": null,\\n        \\\"recordLimit4Search\\\": null\\n    }\",  ParameterType.RequestBody);\r\nIRestResponse response = client.Execute(request);\r\nConsole.WriteLine(response.Content);",
        "language": "csharp"
      },
      {
        "id": "27YgciiU6p31Qmxrz_VnY",
        "code": "curl --location -g --request POST 'http://{{hostname}}/aioc-rest-web/rest/assignedCredential/delete?id=7383274' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n        \"dbId\": 7268922,\n        \"assignedCredentialUser\": {\n            \"id\": \"65646c8a-21f1-4f6e-8a3e-50f89c54ad39\",\n            \"eid\": \"test\",\n            \"personelId\": null,\n            \"name\": \"test\",\n            \"passwordAlgorithm\": \"MD5\",\n            \"password\": \"996b67f0bb66b6c87ed4b9d880c00501\",\n            \"email\": \"test@test.com\",\n            \"surname\": \"test\",\n            \"internal\": true,\n            \"properties\": {\n                \"ubaThreshold\": \"50\"\n            },\n            \"groups\": [\n                \"DEFAULT_GROUP_SYSYEM_USERS\"\n            ],\n            \"managerGroups\": [],\n            \"lastLogin\": null,\n            \"lastLoginIp\": null,\n            \"groupPropertyKey4Search\": null,\n            \"groupPropertyValue4Search\": null,\n            \"recordLimit4Search\": null,\n            \"passwordDirty\": false,\n            \"passwordAutoGenerated\": false,\n            \"filterFunctionName\": null,\n            \"filterMembershipUserId\": null,\n            \"filterManagerId\": null,\n            \"filterEidList\": null,\n            \"filterManagerOfUserId\": null,\n            \"tempUser\": false,\n            \"tempUserStartTime\": null,\n            \"tempUserEndTime\": null,\n            \"lockReason\": null,\n            \"unlockOnPasswordChanged\": false,\n            \"unlockTime\": null,\n            \"externalDirectorySource\": null,\n            \"userPropertyKey4Search\": null,\n            \"userPropertyValue4Search\": null,\n            \"phoneNumber\": null,\n            \"forceChangePasswordOnNextLogin\": false,\n            \"locked\": false\n        },\n        \"credentialSource\": \"SECRET_DATA_VAULT\",\n        \"sapmAccount\": null,\n        \"secretDataVault\": {\n            \"dbId\": 1777537,\n            \"name\": \"windows\",\n            \"description\": null,\n            \"type\": \"USER_CREDENTIAL\",\n            \"ipAddress\": \"10.xx.xx.xx\",\n            \"secretData\": \"oOWJqvoUIvVvZIdzeAtKeQ==\",\n            \"secretData2\": null,\n            \"permissions\": {},\n            \"userCreate\": \"admin\",\n            \"username\": \"test\",\n            \"errorMessage\": null,\n            \"successful\": true,\n            \"privateType\": \"NO\",\n            \"userPermissionLevel\": null\n        },\n        \"deviceGroup\": null,\n        \"recordLimit4Search\": null\n    }'",
        "language": "curl"
      },
      {
        "id": "Zaw1bpev0pz9QFDJ9wmpp",
        "code": "var settings = {\r\n  \"url\": \"http://{{hostname}}/aioc-rest-web/rest/assignedCredential/delete?id=7383274\",\r\n  \"method\": \"POST\",\r\n  \"timeout\": 0,\r\n  \"headers\": {\r\n    \"Content-Type\": \"application/json\"\r\n  },\r\n  \"data\": JSON.stringify({\"dbId\":7268922,\"assignedCredentialUser\":{\"id\":\"65646c8a-21f1-4f6e-8a3e-50f89c54ad39\",\"eid\":\"test\",\"personelId\":null,\"name\":\"test\",\"passwordAlgorithm\":\"MD5\",\"password\":\"996b67f0bb66b6c87ed4b9d880c00501\",\"email\":\"test@test.com\",\"surname\":\"test\",\"internal\":true,\"properties\":{\"ubaThreshold\":\"50\"},\"groups\":[\"DEFAULT_GROUP_SYSYEM_USERS\"],\"managerGroups\":[],\"lastLogin\":null,\"lastLoginIp\":null,\"groupPropertyKey4Search\":null,\"groupPropertyValue4Search\":null,\"recordLimit4Search\":null,\"passwordDirty\":false,\"passwordAutoGenerated\":false,\"filterFunctionName\":null,\"filterMembershipUserId\":null,\"filterManagerId\":null,\"filterEidList\":null,\"filterManagerOfUserId\":null,\"tempUser\":false,\"tempUserStartTime\":null,\"tempUserEndTime\":null,\"lockReason\":null,\"unlockOnPasswordChanged\":false,\"unlockTime\":null,\"externalDirectorySource\":null,\"userPropertyKey4Search\":null,\"userPropertyValue4Search\":null,\"phoneNumber\":null,\"forceChangePasswordOnNextLogin\":false,\"locked\":false},\"credentialSource\":\"SECRET_DATA_VAULT\",\"sapmAccount\":null,\"secretDataVault\":{\"dbId\":1777537,\"name\":\"windows_test\",\"description\":null,\"type\":\"USER_CREDENTIAL\",\"ipAddress\":\"10.xx.xx.xx\",\"secretData\":\"oOWJqvoUIvVvZIdzeAtKeQ==\",\"secretData2\":null,\"permissions\":{},\"userCreate\":\"admin\",\"username\":\"test\",\"errorMessage\":null,\"successful\":true,\"privateType\":\"NO\",\"userPermissionLevel\":null},\"deviceGroup\":null,\"recordLimit4Search\":null}),\r\n};\r\n\r\n$.ajax(settings).done(function (response) {\r\n  console.log(response);\r\n});",
        "language": "javascript"
      }
    ],
    "selectedLanguageId": "EesszfbTh708XRY-cUBrX"
  },
  "description": " ",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::



:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "http://{{hostname}}/aioc-rest-web/rest/assignedCredential/save",
  "name": "Save SAPM",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "O1a16bAltFNHAyaIsRmIT",
        "code": "{\n    \"dbId\": 7371984,\n    \"assignedCredentialUser\": {\n        \"id\": \"65646c8a-21f1-4f6e-8a3e-50f89c54ad39\",\n        \"eid\": \"test\",\n        \"personelId\": null,\n        \"name\": \"test\",\n        \"passwordAlgorithm\": \"MD5\",\n        \"password\": \"996b67f0bb66b6c87ed4b9d880c00501\",\n        \"email\": \"test@test.com\",\n        \"surname\": \"test\",\n        \"internal\": true,\n        \"properties\": {\n            \"ubaThreshold\": \"50\"\n        },\n        \"groups\": [\n            \"DEFAULT_GROUP_SYSYEM_USERS\"\n        ],\n        \"managerGroups\": [],\n        \"lastLogin\": null,\n        \"lastLoginIp\": null,\n        \"groupPropertyKey4Search\": null,\n        \"groupPropertyValue4Search\": null,\n        \"recordLimit4Search\": null,\n        \"passwordDirty\": false,\n        \"passwordAutoGenerated\": false,\n        \"filterFunctionName\": null,\n        \"filterMembershipUserId\": null,\n        \"filterManagerId\": null,\n        \"filterEidList\": null,\n        \"filterManagerOfUserId\": null,\n        \"tempUser\": false,\n        \"tempUserStartTime\": null,\n        \"tempUserEndTime\": null,\n        \"phoneNumber\": null,\n        \"forceChangePasswordOnNextLogin\": false,\n        \"lockReason\": null,\n        \"unlockOnPasswordChanged\": false,\n        \"unlockTime\": null,\n        \"externalDirectorySource\": null,\n        \"userPropertyKey4Search\": null,\n        \"userPropertyValue4Search\": null,\n        \"locked\": false\n    },\n    \"credentialSource\": \"SAPM\",\n    \"sapmAccount\": {\n        \"dbId\": 566585,\n        \"device\": {\n            \"dbId\": 1,\n            \"id\": \"127.0.0.1\",\n            \"name\": \"127.0.0.1\",\n            \"accessProtocol\": \"SSHv2\",\n            \"managementIp\": \"127.0.0.1\",\n            \"elementType\": {\n                \"dbId\": 203638,\n                \"elementTypeId\": \"sc_proxy\",\n                \"elementTypeName\": \"SC PROXY\",\n                \"vendor\": null,\n                \"category\": null,\n                \"elementTypeProperties\": []\n            },\n            \"discoveryTime\": 1530205124000,\n            \"properties\": {\n                \"hostname\": \"127.0.0.1\",\n                \"pseudoDevice\": \"true\"\n            },\n            \"deviceGroups\": [\n                \"dg.sc_proxy\"\n            ],\n            \"availability\": null,\n            \"currentMaintenanceWindow\": null,\n            \"interfaceName\": null,\n            \"nameManagementIp\": \"127.0.0.1-127.0.0.1\",\n            \"regionName\": null,\n            \"filterRecordLimit\": null,\n            \"filterSearchPhrase\": null,\n            \"filterGroupId\": null,\n            \"filterRoleGroupIds\": null,\n            \"filterOnlyUnassignedDevices\": null,\n            \"pseudoDevice\": true,\n            \"domainController\": null,\n            \"portNum\": null,\n            \"discoverySource\": null\n        },\n        \"config\": {\n            \"configId\": -9077,\n            \"name\": \"Linux\",\n            \"description\": \"Linux\",\n            \"strategy\": \"SSH\",\n            \"properties\": {\n                \"new.user.found.action\": \"LOG\",\n                \"username.parser\": \"(.*?):.*\",\n                \"change.password.command.template\": \"passwd\\\\n${oldPassword}\\\\n${newPassword}\\\\n${newPassword}\\\\nlogout\",\n                \"user.list.command\": \"cat /etc/passwd\"\n            },\n            \"exactMatch4Search\": false,\n            \"recordLimit4Search\": null\n        },\n        \"changePeriod\": 28800,\n        \"username\": \"kron1\",\n        \"password\": \"0E4PzY2ByShg26PoZSbfJA==\",\n        \"previousPassword\": \"3HxMdrxt1OlKI/cBlhei5g==\",\n        \"lastChangeTime\": 1604823540077,\n        \"nextChangeTime\": 1606551540077,\n        \"nextChangeTimeStart4Search\": null,\n        \"nextChangeTimeEnd4Search\": null,\n        \"passwordSeenStatus\": \"UNSEEN\",\n        \"validationStatus\": \"VALID\",\n        \"changeStatus\": null,\n        \"lastAttemptStatus\": true,\n        \"masterAccountId\": null,\n        \"permissions\": {},\n        \"identicalSapmAccounts\": [],\n        \"recordLimit4Search\": null,\n        \"validationStatus4Search\": null,\n        \"checkPermission4Search\": true,\n        \"exactMatch4Search\": false,\n        \"acceptedSapmConfigList\": null,\n        \"masterAccountId4Search\": null,\n        \"searchOnlyMasterAccounts\": false,\n        \"searchOnlyOwnRegion\": false,\n        \"deviceIp4Search\": null,\n        \"secondPartSeenUsername\": null,\n        \"firstPartSeenUsername\": null,\n        \"errorMessage\": null,\n        \"successful\": true,\n        \"changePeriodFormatted\": \"20d 00h 00m\"\n    },\n    \"secretDataVault\": null,\n    \"device\": null,\n    \"deviceGroup\": null,\n    \"recordLimit4Search\": null\n}",
        "language": "200"
      },
      {
        "id": "fuZCcZYWu1Ao4OkRnef18",
        "code": "not found id 65646c8a-21f1-4f6e-8a3e-50f8",
        "language": "400"
      }
    ],
    "selectedLanguageId": "O1a16bAltFNHAyaIsRmIT"
  },
  "examples": {
    "languages": [
      {
        "id": "vvsYZHkiS5GqpQ_FVFNiu",
        "code": "var client = new RestClient(\"http://{{hostname}}/aioc-rest-web/rest/assignedCredential/save\");\r\nclient.Timeout = -1;\r\nvar request = new RestRequest(Method.POST);\r\nrequest.AddHeader(\"Content-Type\", \"application/json\");\r\nrequest.AddParameter(\"application/json\", \"{\\n    \\\"credentialSource\\\": \\\"SAPM\\\",\\n    \\\"userId\\\": \\\"65646c8a-21f1-4f6e-8a3e-50f89c54ad39\\\",\\n    \\\"id\\\": \\\"566585\\\"\\n}\",  ParameterType.RequestBody);\r\nIRestResponse response = client.Execute(request);\r\nConsole.WriteLine(response.Content);",
        "language": "csharp"
      },
      {
        "id": "dHtiq8MuewuGW4lN1c267",
        "code": "curl --location -g --request POST 'http://{{hostname}}/aioc-rest-web/rest/assignedCredential/save' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"credentialSource\": \"SAPM\",\n    \"userId\": \"65646c8a-21f1-4f6e-8a3e-50f89c54ad39\",\n    \"id\": \"566585\"\n}'",
        "language": "curl"
      },
      {
        "id": "TWkesYOdraw621-XU3098",
        "code": "var settings = {\r\n  \"url\": \"http://{{hostname}}/aioc-rest-web/rest/assignedCredential/save\",\r\n  \"method\": \"POST\",\r\n  \"timeout\": 0,\r\n  \"headers\": {\r\n    \"Content-Type\": \"application/json\"\r\n  },\r\n  \"data\": JSON.stringify({\"credentialSource\":\"SAPM\",\"userId\":\"65646c8a-21f1-4f6e-8a3e-50f89c54ad39\",\"id\":\"566585\"}),\r\n};\r\n\r\n$.ajax(settings).done(function (response) {\r\n  console.log(response);\r\n});",
        "language": "javascript"
      }
    ],
    "selectedLanguageId": "vvsYZHkiS5GqpQ_FVFNiu"
  },
  "description": " ",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::



:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "http://{{hostname}}/aioc-rest-web/rest/assignedCredential/save",
  "name": "Save Secret Data Vault",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "B3GsjxOiztGf03lTfHoqi",
        "code": "{\n    \"dbId\": 7383274,\n    \"assignedCredentialUser\": {\n        \"id\": \"65646c8a-21f1-4f6e-8a3e-50f89c54ad39\",\n        \"eid\": \"test\",\n        \"personelId\": null,\n        \"name\": \"test\",\n        \"passwordAlgorithm\": \"MD5\",\n        \"password\": \"996b67f0bb66b6c87ed4b9d880c00501\",\n        \"email\": \"test@test.com\",\n        \"surname\": \"test\",\n        \"internal\": true,\n        \"properties\": {\n            \"ubaThreshold\": \"50\"\n        },\n        \"groups\": [\n            \"DEFAULT_GROUP_SYSYEM_USERS\"\n        ],\n        \"managerGroups\": [],\n        \"lastLogin\": null,\n        \"lastLoginIp\": null,\n        \"groupPropertyKey4Search\": null,\n        \"groupPropertyValue4Search\": null,\n        \"recordLimit4Search\": null,\n        \"passwordDirty\": false,\n        \"passwordAutoGenerated\": false,\n        \"filterFunctionName\": null,\n        \"filterMembershipUserId\": null,\n        \"filterManagerId\": null,\n        \"filterEidList\": null,\n        \"filterManagerOfUserId\": null,\n        \"tempUser\": false,\n        \"tempUserStartTime\": null,\n        \"tempUserEndTime\": null,\n        \"unlockTime\": null,\n        \"externalDirectorySource\": null,\n        \"userPropertyKey4Search\": null,\n        \"userPropertyValue4Search\": null,\n        \"unlockOnPasswordChanged\": false,\n        \"phoneNumber\": null,\n        \"forceChangePasswordOnNextLogin\": false,\n        \"lockReason\": null,\n        \"locked\": false\n    },\n    \"credentialSource\": \"SECRET_DATA_VAULT\",\n    \"sapmAccount\": null,\n    \"secretDataVault\": {\n        \"dbId\": 1777537,\n        \"name\": \"windows_test\",\n        \"description\": null,\n        \"type\": \"USER_CREDENTIAL\",\n        \"ipAddress\": \"10.xx.xx.xx\",\n        \"secretData\": \"oOWJqvoUIvVvZIdzeAtKeQ==\",\n        \"secretData2\": null,\n        \"permissions\": {},\n        \"userCreate\": \"admin\",\n        \"username\": \"test\",\n        \"errorMessage\": null,\n        \"successful\": true,\n        \"privateType\": \"NO\",\n        \"userPermissionLevel\": null\n    },\n    \"device\": null,\n    \"deviceGroup\": null,\n    \"recordLimit4Search\": null\n}",
        "language": "200"
      },
      {
        "id": "5lXJkfOhDmM2NfmX10qV2",
        "code": "SapmAccount account not found by id 1777537",
        "language": "400"
      }
    ],
    "selectedLanguageId": "B3GsjxOiztGf03lTfHoqi"
  },
  "examples": {
    "languages": [
      {
        "id": "t_wt_7EwNsjRCBOmId-0E",
        "code": "var client = new RestClient(\"http://{{hostname}}/aioc-rest-web/rest/assignedCredential/save\");\r\nclient.Timeout = -1;\r\nvar request = new RestRequest(Method.POST);\r\nrequest.AddHeader(\"Content-Type\", \"application/json\");\r\nrequest.AddParameter(\"application/json\", \"{\\n    \\\"credentialSource\\\": \\\"SECRET_DATA_VAULT\\\",\\n    \\\"userId\\\": \\\"65646c8a-21f1-4f6e-8a3e-50f89c54ad39\\\",\\n    \\\"id\\\": \\\"1777537\\\",\\n    \\\"deviceOrDeviceGroupId\\\": \\\"4eef1637-1dee-429d-92f0-860b8193bde5\\\"\\n    \\n}\",  ParameterType.RequestBody);\r\nIRestResponse response = client.Execute(request);\r\nConsole.WriteLine(response.Content);",
        "language": "csharp"
      },
      {
        "id": "Hwh0cc0Ay9n-JwrbOPKnK",
        "code": "curl --location -g --request POST 'http://{{hostname}}/aioc-rest-web/rest/assignedCredential/save' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n    \"credentialSource\": \"SECRET_DATA_VAULT\",\n    \"userId\": \"65646c8a-21f1-4f6e-8a3e-50f89c54ad39\",\n    \"id\": \"1777537\",\n    \"deviceOrDeviceGroupId\": \"4eef1637-1dee-429d-92f0-860b8193bde5\"\n    \n}'",
        "language": "curl"
      },
      {
        "id": "tmMmU9cLVd07g-EFKLZkh",
        "code": "var settings = {\r\n  \"url\": \"http://{{hostname}}/aioc-rest-web/rest/assignedCredential/save\",\r\n  \"method\": \"POST\",\r\n  \"timeout\": 0,\r\n  \"headers\": {\r\n    \"Content-Type\": \"application/json\"\r\n  },\r\n  \"data\": JSON.stringify({\"credentialSource\":\"SECRET_DATA_VAULT\",\"userId\":\"65646c8a-21f1-4f6e-8a3e-50f89c54ad39\",\"id\":\"1777537\",\"deviceOrDeviceGroupId\":\"4eef1637-1dee-429d-92f0-860b8193bde5\"}),\r\n};\r\n\r\n$.ajax(settings).done(function (response) {\r\n  console.log(response);\r\n});",
        "language": "javascript"
      }
    ],
    "selectedLanguageId": "t_wt_7EwNsjRCBOmId-0E"
  },
  "description": " ",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::



