Edit Application Token Account
1 min
POST
http://localhost/aioc-rest-web/rest/aapm/editAapmAccount
Header Parameters
- x-xsrf-tokenstringDefault{{x-xsrf-token}}
Body Parameters
- bodyobjectDefault{ "dbId": 237913, "applicationName": "My New Updated AAPM Account", "applicationIPs": ["0.0.0.0/0"], "sapmAccounts": null, "sapmGroups": [19731, 73758, 109612, 109635], "restrictions": { "allowListingAccounts": true, "maxUsageCount": "50" } }
Responses
200
curl
curl --request POST \
--url http://localhost/aioc-rest-web/rest/aapm/editAapmAccount \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-xsrf-token: {{x-xsrf-token}}' \
--data '"{\r\n \"dbId\": 237913,\r\n \"applicationName\": \"My New Updated AAPM Account\",\r\n \"applicationIPs\": [\"0.0.0.0/0\"],\r\n \"sapmAccounts\": null,\t\r\n \"sapmGroups\": [19731, 73758, 109612, 109635],\r\n \"restrictions\": {\r\n \"allowListingAccounts\": true,\r\n \"maxUsageCount\": \"50\"\r\n \t}\r\n}"'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-xsrf-token", "{{x-xsrf-token}}");
var raw = JSON.stringify("{\r\n \"dbId\": 237913,\r\n \"applicationName\": \"My New Updated AAPM Account\",\r\n \"applicationIPs\": [\"0.0.0.0/0\"],\r\n \"sapmAccounts\": null,\t\r\n \"sapmGroups\": [19731, 73758, 109612, 109635],\r\n \"restrictions\": {\r\n \"allowListingAccounts\": true,\r\n \"maxUsageCount\": \"50\"\r\n \t}\r\n}");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("http://localhost/aioc-rest-web/rest/aapm/editAapmAccount", 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("http://localhost/aioc-rest-web/rest/aapm/editAapmAccount")
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"] = "{{x-xsrf-token}}"
request.body = JSON.dump("{\r\n \"dbId\": 237913,\r\n \"applicationName\": \"My New Updated AAPM Account\",\r\n \"applicationIPs\": [\"0.0.0.0/0\"],\r\n \"sapmAccounts\": null,\t\r\n \"sapmGroups\": [19731, 73758, 109612, 109635],\r\n \"restrictions\": {\r\n \"allowListingAccounts\": true,\r\n \"maxUsageCount\": \"50\"\r\n \t}\r\n}")
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "http://localhost/aioc-rest-web/rest/aapm/editAapmAccount"
payload = json.dumps("{\r\n \"dbId\": 237913,\r\n \"applicationName\": \"My New Updated AAPM Account\",\r\n \"applicationIPs\": [\"0.0.0.0/0\"],\r\n \"sapmAccounts\": null,\t\r\n \"sapmGroups\": [19731, 73758, 109612, 109635],\r\n \"restrictions\": {\r\n \"allowListingAccounts\": true,\r\n \"maxUsageCount\": \"50\"\r\n \t}\r\n}")
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-xsrf-token': '{{x-xsrf-token}}'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200