Add Escalated Approval Managers For Vault Group
1 min
POST
{{url}}/aioc-rest-web/rest/sc/sapm/addEscalatedManagersForSapmGroup
Path Parameters
- urlstringDefaulturl
Header Parameters
- X-XSRF-TOKENstringDefault{{csrftoken}}
Body Parameters
- bodyobjectDefault{ "dbId": 384793, "newEscalatedManager": "5abc8df4-d48c-49d0-93fc-34bdce3c0fa6", "approvalLevel": 2, "managerDbId": 415146, "applyType": "THIS_ONLY" }
Responses
200
curl
curl --request POST \
--url {{url}}/aioc-rest-web/rest/sc/sapm/addEscalatedManagersForSapmGroup \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-xsrf-token: {{csrftoken}}' \
--data '"{\n \"dbId\": 384793,\n \"newEscalatedManager\": \"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\",\n \"approvalLevel\": 2,\n \"managerDbId\": 415146,\n \"applyType\": \"THIS_ONLY\"\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 \"dbId\": 384793,\n \"newEscalatedManager\": \"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\",\n \"approvalLevel\": 2,\n \"managerDbId\": 415146,\n \"applyType\": \"THIS_ONLY\"\n}");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{{url}}/aioc-rest-web/rest/sc/sapm/addEscalatedManagersForSapmGroup", 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/addEscalatedManagersForSapmGroup")
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 \"dbId\": 384793,\n \"newEscalatedManager\": \"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\",\n \"approvalLevel\": 2,\n \"managerDbId\": 415146,\n \"applyType\": \"THIS_ONLY\"\n}")
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "{{url}}/aioc-rest-web/rest/sc/sapm/addEscalatedManagersForSapmGroup"
payload = json.dumps("{\n \"dbId\": 384793,\n \"newEscalatedManager\": \"5abc8df4-d48c-49d0-93fc-34bdce3c0fa6\",\n \"approvalLevel\": 2,\n \"managerDbId\": 415146,\n \"applyType\": \"THIS_ONLY\"\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": 384793,
"id": "d3535aa7-eb10-4e3a-8dc8-322c96b19beb",
"name": "SSH SAPM GROUP",
"description": null,
"parentSapmGroupId": null,
"permissions": [
{
"id": "dbae236b-90b5-4b7b-9696-ab85df33766e",
"eid": null,
"permission": "FULL_CONTROL",
"type": "USER_GROUP"
},
{
"id": "757b08a2-3e04-458c-8cd8-49084df3a37a",
"eid": null,
"permission": "READ_ONLY",
"type": "USER_GROUP"
}
],
"owner": {
"id": "25e53f47-ce66-4df2-9abc-6961dc668264",
"eid": "admin"
},
"userPermissionLevel": 6,
"approvalStatus": null,
"fullPath": "/SSH SAPM GROUP",
"createdAt": 1694613811832,
"updatedAt": 1694777940108
}