Reset Password with Manual Password
1 min
POST
{{url}}/aioc-rest-web/rest/sc/sapm/resetPasswordWithManualPassword
Path Parameters
- urlstringDefaulturl
Header Parameters
- Content-TypestringDefaultapplication/json
- CookiestringDefault{{netrightCookie}}
- X-XSRF-TOKENstringDefault{{csrftoken}}
Body Parameters
- bodyobjectDefault{ "sapmDbId": 478160, "sapmConfigId": 56349, "password": "NEW_MANUAL_PASSWORD", "comment": "SOME_COMMENT", "passwordExpirationInMinute": "5m", // Optional, default value is 30 minutes }
Responses
200
curl
curl --request POST \
--url {{url}}/aioc-rest-web/rest/sc/sapm/resetPasswordWithManualPassword \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--cookie {{netrightCookie}} \
--header 'x-xsrf-token: {{csrftoken}}' \
--data '"{\n \"sapmDbId\": 478160,\n \"sapmConfigId\": 56349,\n \"password\": \"NEW_MANUAL_PASSWORD\",\n \"comment\": \"SOME_COMMENT\",\n \"passwordExpirationInMinute\": \"5m\", // Optional, default value is 30 minutes\n\n}"'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("cookie", "{{netrightCookie}} ");
myHeaders.append("x-xsrf-token", "{{csrftoken}}");
var raw = JSON.stringify("{\n \"sapmDbId\": 478160,\n \"sapmConfigId\": 56349,\n \"password\": \"NEW_MANUAL_PASSWORD\",\n \"comment\": \"SOME_COMMENT\",\n \"passwordExpirationInMinute\": \"5m\", // Optional, default value is 30 minutes\n\n}");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{{url}}/aioc-rest-web/rest/sc/sapm/resetPasswordWithManualPassword", 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/resetPasswordWithManualPassword")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request["cookie"] = "{{netrightCookie}} "
request["x-xsrf-token"] = "{{csrftoken}}"
request.body = JSON.dump("{\n \"sapmDbId\": 478160,\n \"sapmConfigId\": 56349,\n \"password\": \"NEW_MANUAL_PASSWORD\",\n \"comment\": \"SOME_COMMENT\",\n \"passwordExpirationInMinute\": \"5m\", // Optional, default value is 30 minutes\n\n}")
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "{{url}}/aioc-rest-web/rest/sc/sapm/resetPasswordWithManualPassword"
payload = json.dumps("{\n \"sapmDbId\": 478160,\n \"sapmConfigId\": 56349,\n \"password\": \"NEW_MANUAL_PASSWORD\",\n \"comment\": \"SOME_COMMENT\",\n \"passwordExpirationInMinute\": \"5m\", // Optional, default value is 30 minutes\n\n}")
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'cookie': '{{netrightCookie}} ',
'x-xsrf-token': '{{csrftoken}}'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200