Set Approval Managers For Vault Account
1 min
POST
{{url}}/aioc-rest-web/rest/sc/sapm/setApprovalManagersForSapmAccount
Path Parameters
- urlstringDefaulturl
Header Parameters
- X-XSRF-TOKENstringDefault{{csrftoken}}
Body Parameters
- bodyobjectDefault{ "sapmDbId": 9483, "managers":[ "DEFAULT_GROUP_SYSYEM_ADMINS" ] }
Responses
200
curl
curl --request POST \
--url {{url}}/aioc-rest-web/rest/sc/sapm/setApprovalManagersForSapmAccount \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-xsrf-token: {{csrftoken}}' \
--data '"{\n\t\"sapmDbId\": 9483,\n\t\"managers\":[\n\t\t\"DEFAULT_GROUP_SYSYEM_ADMINS\"\n\t]\n}"'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-xsrf-token", "{{csrftoken}}");
var raw = JSON.stringify("{\n\t\"sapmDbId\": 9483,\n\t\"managers\":[\n\t\t\"DEFAULT_GROUP_SYSYEM_ADMINS\"\n\t]\n}");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{{url}}/aioc-rest-web/rest/sc/sapm/setApprovalManagersForSapmAccount", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("{{url}}/aioc-rest-web/rest/sc/sapm/setApprovalManagersForSapmAccount")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-xsrf-token"] = "{{csrftoken}}"
request.body = JSON.dump("{\n\t\"sapmDbId\": 9483,\n\t\"managers\":[\n\t\t\"DEFAULT_GROUP_SYSYEM_ADMINS\"\n\t]\n}")
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "{{url}}/aioc-rest-web/rest/sc/sapm/setApprovalManagersForSapmAccount"
payload = json.dumps("{\n\t\"sapmDbId\": 9483,\n\t\"managers\":[\n\t\t\"DEFAULT_GROUP_SYSYEM_ADMINS\"\n\t]\n}")
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-xsrf-token': '{{csrftoken}}'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
{
"dbId": 9483,
"device": {
"dbId": 9293,
"id": "72567faa-743a-425d-bfb9-6243fa14e415",
"name": "nurs",
"accessProtocol": "SSHv2",
"managementIp": "10.20.42.36",
"elementType": {
"dbId": -1256593,
"elementTypeId": "linux",
"elementTypeName": "Linux Server",
"vendor": null,
"category": null,
"elementTypeProperties": [
{
"dbId": -224107347,
"elementTypePropertyValue": ".*?(>|\\$|#|%)",
"elementTypePropertyKey": "enforcer.terminal.behaviour.prompt_pattern",
"elementTypePropertyType": null
},
{
"dbId": -316330256,
"elementTypePropertyValue": "-1",
"elementTypePropertyKey": "shell.terminal.config.fixed_pty_columns",
"elementTypePropertyType": null
},
{
"dbId": -224107346,
"elementTypePropertyValue": "do_nothing",
"elementTypePropertyKey": "enforcer.terminal.behaviour.ctrl_z",
"elementTypePropertyType": null
},
{
"dbId": -328315408,
"elementTypePropertyValue": "^Quit.*",
"elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns",
"elementTypePropertyType": null
},
{
"dbId": -328318769,
"elementTypePropertyValue": ".*(?i)password[:|>].*",
"elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns",
"elementTypePropertyType": null
},
{
"dbId": -224107345,
"elementTypePropertyValue": "abort",
"elementTypePropertyKey": "enforcer.terminal.behaviour.ctrl_c",
"elementTypePropertyType": null
},
{
"dbId": -328317181,
"elementTypePropertyValue": "^Are you sure.*",
"elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns",
"elementTypePropertyType": null
},
{
"dbId": -355141703,
"elementTypePropertyValue": "^Select choice.*",
"elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns",
"elementTypePropertyType": null
},
{
"dbId": -328321729,
"elementTypePropertyValue": "^Enter the date.*",
"elementTypePropertyKey": "enforcer.terminal.behaviour.exc_last_line_patterns",
"elementTypePropertyType": null
}
]
},
"discoveryTime": 1595243260298,
"properties": {
"pseudoDevice": "true"
},
"deviceGroups": [
"55d86014-ae4f-43c7-8453-5499fc5de7d0"
],
"availability": null,
"currentMaintenanceWindow": null,
"interfaceName": null,
"nameManagementIp": "nurs-10.20.42.36",
"regionName": null,
"filterRecordLimit": null,
"filterSearchPhrase": null,
"filterGroupId": null,
"filterRoleGroupIds": null,
"filterOnlyUnassignedDevices": null,
"pseudoDevice": true,
"portNum": 22,
"domainController": null,
"discoverySource": null
},
"secretName": "nursena",
"config": {
"configId": -9077,
"name": "Linux",
"description": "Linux",
"strategy": "SSH",
"staticSecretType": "OTHER",
"properties": {
"new.user.found.action": "LOG",
"username.parser": "(.*?) : (.*)",
"change.password.command.template": "passwd\\n${oldPassword}\\n${newPassword}\\n${newPassword}\\nlogout",
"user.list.command": "cut -d: -f1 /etc/passwd | xargs groups"
},
"exactMatch4Search": false,
"recordLimit4Search": null
},
"changePeriod": 1440,
"username": "test",
"description": "test",
"password": "SmGSlOg6vv+AM0cdpJjTcA==",
"previousPassword": "uiPMruFuN+fIhGkcq0Kt2A==",
"lastChangeTime": 1599027182798,
"nextChangeTime": 1599113582798,
"nextChangeTimeStart4Search": null,
"nextChangeTimeEnd4Search": null,
"passwordSeenStatus": "UNSEEN",
"validationStatus": "VALID",
"changeStatus": null,
"lastAttemptStatus": true,
"masterAccountId": null,
"permissions": {},
"newPermission": {},
"permissionToDelete": {},
"groupManagerToDelete": null,
"identicalSapmAccounts": [],
"recordLimit4Search": null,
"validationStatus4Search": null,
"checkPermission4Search": true,
"acceptedSapmConfigList": null,
"searchOnlyMasterAccounts": false,
"searchOnlyOwnRegion": false,
"deviceIp4Search": null,
"secondPartSeenUsername": null,
"firstPartSeenUsername": null,
"errorMessage": null,
"successful": true,
"parentSapmGroup": {
"dbId": 9257,
"id": "9bcb8c02-ec4b-4ad4-8825-c071c9eac8d1",
"name": "test group",
"description": null,
"parentSapmGroupId": null,
"permissions": {},
"newPermission": {},
"permissionToDelete": {},
"children": [],
"userCreate": "admin",
"parent": null,
"userPermissionLevel": null,
"managers": [],
"newGroupManager": null,
"groupManagerToDelete": null,
"approvalStatus": null,
"fullPath": null,
"approvalRequired": false,
"manager": false,
"newApprovalRequired": false,
"auditor": false
},
"parentSapmName4Search": null,
"secretType": "DYNAMIC",
"userCreate": "admin",
"managers": [
{
"id": "DEFAULT_GROUP_SYSYEM_ADMINS",
"eid": "System.admins",
"description": "Default system admin group",
"users": [
{
"id": "25e53f47-ce66-4df2-9abc-6961dc668264",
"eid": "admin",
"personelId": null,
"name": "Administrator",
"passwordAlgorithm": null,
"password": "0192023a7bbd73250516f069df18b500",
"secondPassword": null,
"email": null,
"surname": "Administrator",
"internal": true,
"properties": {
"ubaThreshold": "50"
},
"groups": [
"DEFAULT_GROUP_SYSYEM_USERS",
"DEFAULT_GROUP_SYSYEM_ADMINS"
],
"managerGroups": [
"DEFAULT_GROUP_SYSYEM_ADMINS"
],
"lastLogin": 1599046474049,
"lastLoginIp": "10.20.41.123",
"groupPropertyKey4Search": null,
"groupPropertyValue4Search": null,
"recordLimit4Search": null,
"passwordDirty": false,
"secondPasswordChange": false,
"passwordAutoGenerated": false,
"filterFunctionName": null,
"filterMembershipUserId": null,
"filterManagerId": null,
"filterEidList": null,
"filterManagerOfUserId": null,
"phoneNumber": null,
"forceChangePasswordOnNextLogin": false,
"lockReason": null,
"unlockOnPasswordChanged": false,
"unlockTime": null,
"tempUserEndTime": null,
"tempUserStartTime": null,
"tempUser": false,
"externalDirectorySource": null,
"userPropertyKey4Search": null,
"userPropertyValue4Search": null,
"locked": false
}
],
"managers": [
{
"id": "25e53f47-ce66-4df2-9abc-6961dc668264",
"eid": "admin",
"personelId": null,
"name": "Administrator",
"passwordAlgorithm": null,
"password": "0192023a7bbd73250516f069df18b500",
"secondPassword": null,
"email": null,
"surname": "Administrator",
"internal": true,
"properties": {
"ubaThreshold": "50"
},
"groups": [
"DEFAULT_GROUP_SYSYEM_USERS",
"DEFAULT_GROUP_SYSYEM_ADMINS"
],
"managerGroups": [
"DEFAULT_GROUP_SYSYEM_ADMINS"
],
"lastLogin": 1599046474049,
"lastLoginIp": "10.20.41.123",
"groupPropertyKey4Search": null,
"groupPropertyValue4Search": null,
"recordLimit4Search": null,
"passwordDirty": false,
"secondPasswordChange": false,
"passwordAutoGenerated": false,
"filterFunctionName": null,
"filterMembershipUserId": null,
"filterManagerId": null,
"filterEidList": null,
"filterManagerOfUserId": null,
"phoneNumber": null,
"forceChangePasswordOnNextLogin": false,
"lockReason": null,
"unlockOnPasswordChanged": false,
"unlockTime": null,
"tempUserEndTime": null,
"tempUserStartTime": null,
"tempUser": false,
"externalDirectorySource": null,
"userPropertyKey4Search": null,
"userPropertyValue4Search": null,
"locked": false
}
],
"realms": [],
"deviceRealms": [],
"properties": {
"adminGroup": "true",
"systemGroup": "true"
},
"recordLimit4Search": null,
"groupPropertyKey4Search": null,
"groupPropertyValue4Search": null,
"filterGroupIdList": null,
"autonomousGroup": false,
"approvalRequired": false,
"externalDirectorySources": null,
"otpEnabled": false,
"sshProxyEnabled": false,
"rdpProxyEnabled": false,
"httpProxyEnabled": false,
"sftpProxyEnabled": false,
"sqlProxyEnabled": false,
"containLocalUser4Search": false,
"allowDirectAccess": false,
"allowConsoleAccess": false,
"adminGroup": true,
"passwordTtl": null,
"systemGroup": true,
"registrationRole": false
}
],
"newGroupManager": null,
"userPermissionLevel": 3,
"privateType": "YES",
"approvalStatus": null,
"parentSapmGroupDbId": null,
"groupFullPath": "/test group",
"approvedBy": null,
"approvedDate": null,
"getFullPermissionUser": false,
"skipFillPermission": false,
"sqlSearchSapmParent": [],
"firstResult": null,
"maxResult": null,
"exactMatch4Search": false,
"masterAccountId4Search": null,
"changePeriodFormatted": "01d 00h 00m",
"accountWithDynamicStrategy": false,
"approvalRequired": false,
"manager": false
}