Delete Permission From Account
1 min
DELETE
{{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromAccount
Path Parameters
- urlstringDefaulturl
Header Parameters
- X-XSRF-TOKENstringDefault{{csrftoken}}
Body Parameters
- bodyobjectDefault{ "sapmDbId": 3589891, "permissionToDelete": [ { "userGroupId": "98b592a0-0ff6-40bc-804b-1c0030a5695e", "permission": "FULL_CONTROL" }, { "userGroupId": "fe9bfde2-9530-4768-868c-6af5d16303a1", "permission": "FULL_CONTROL" } ] }
Responses
200
curl
curl --request DELETE \
--url {{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromAccount \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-xsrf-token: {{csrftoken}}' \
--data '"{\r\n \"sapmDbId\": 3589891,\r\n \"permissionToDelete\": [\r\n {\r\n \"userGroupId\": \"98b592a0-0ff6-40bc-804b-1c0030a5695e\",\r\n \"permission\": \"FULL_CONTROL\"\r\n },\r\n {\r\n \"userGroupId\": \"fe9bfde2-9530-4768-868c-6af5d16303a1\",\r\n \"permission\": \"FULL_CONTROL\"\r\n }\r\n ]\r\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("{\r\n \"sapmDbId\": 3589891,\r\n \"permissionToDelete\": [\r\n {\r\n \"userGroupId\": \"98b592a0-0ff6-40bc-804b-1c0030a5695e\",\r\n \"permission\": \"FULL_CONTROL\"\r\n },\r\n {\r\n \"userGroupId\": \"fe9bfde2-9530-4768-868c-6af5d16303a1\",\r\n \"permission\": \"FULL_CONTROL\"\r\n }\r\n ]\r\n}");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromAccount", 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/deletePermissionFromAccount")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Delete.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["x-xsrf-token"] = "{{csrftoken}}"
request.body = JSON.dump("{\r\n \"sapmDbId\": 3589891,\r\n \"permissionToDelete\": [\r\n {\r\n \"userGroupId\": \"98b592a0-0ff6-40bc-804b-1c0030a5695e\",\r\n \"permission\": \"FULL_CONTROL\"\r\n },\r\n {\r\n \"userGroupId\": \"fe9bfde2-9530-4768-868c-6af5d16303a1\",\r\n \"permission\": \"FULL_CONTROL\"\r\n }\r\n ]\r\n}")
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "{{url}}/aioc-rest-web/rest/sc/sapm/deletePermissionFromAccount"
payload = json.dumps("{\r\n \"sapmDbId\": 3589891,\r\n \"permissionToDelete\": [\r\n {\r\n \"userGroupId\": \"98b592a0-0ff6-40bc-804b-1c0030a5695e\",\r\n \"permission\": \"FULL_CONTROL\"\r\n },\r\n {\r\n \"userGroupId\": \"fe9bfde2-9530-4768-868c-6af5d16303a1\",\r\n \"permission\": \"FULL_CONTROL\"\r\n }\r\n ]\r\n}")
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-xsrf-token': '{{csrftoken}}'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
200