Assigned Credential
3 min
Search SAPM Account ID
GET
http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search?sapmAccountId=566585");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);Search By User Id and Cred. Source
GET
http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search?userId=68f84f67-3ad2-47c3-80cd-dda69fd327e3&source=SECRET_DATA_VAULT
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search?userId=68f84f67-3ad2-47c3-80cd-dda69fd327e3&source=SECRET_DATA_VAULT");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Search By User Id and Secret Data Vault Id - Device or Device Group Id
GET
http://{{hostname}}/aioc-rest-web/rest/assignedCredential/search?secretVaultId=1777537&userId=65646c8a-21f1-4f6e-8a3e-50f89c54ad39&deviceOrDeviceGroupId=4eef1637-1dee-429d-92f0-860b8193bde5
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");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Delete
POST
http://{{hostname}}/aioc-rest-web/rest/assignedCredential/delete?id=7383274
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/assignedCredential/delete?id=7383274");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.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\": \"[email protected]\",\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);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Save SAPM
POST
http://{{hostname}}/aioc-rest-web/rest/assignedCredential/save
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/assignedCredential/save");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n \"credentialSource\": \"SAPM\",\n \"userId\": \"65646c8a-21f1-4f6e-8a3e-50f89c54ad39\",\n \"id\": \"566585\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Save Secret Data Vault
POST
http://{{hostname}}/aioc-rest-web/rest/assignedCredential/save
var client = new RestClient("http://{{hostname}}/aioc-rest-web/rest/assignedCredential/save");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.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);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);