Get All Password Policies
Gets all password policies, available to clients.
This request doesn’t require authentication. |
Response
Returns a list of all password policies in the system.
[
{
"name": "Default",
"length": 32,
"minLowercase": 1,
"minCapital": 2,
"minDigits": 3,
"minSpecial": 4,
"id": 1
},
{
"name": "Policy",
"length": 1,
"minLowercase": 3,
"minCapital": 0,
"minDigits": 0,
"minSpecial": 0,
"changePasswordOnFirstLogin": true,
"passwordExpiredNotificationPeriod": 1,
"passwordLifetime": 7,
"uniquePasswordsNumber": 1,
"id": "635a5b5425bb8a49371f3f92"
},
...
]
Example
Request
-
Bash
-
JavaScript
-
NodeJS
-
Python
saymon_hostname=<...>
url=https://$saymon_hostname/node/api/password-policies
curl -X GET $url
let saymonHostname = <...>
let path = "/node/api/password-policies";
let requestOptions = {
method: "GET"
};
fetch(saymonHostname + path, requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log("error", error));
const http = require("http");
let saymonHostname = <...>
let path = "/node/api/password-policies";
let options = {
"method": "GET",
"hostname": saymonHostname,
"path": path
};
let req = http.request(options, function (res) {
let chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
let body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
req.end();
import requests
saymon_hostname = <...>
url = "https://" + saymon_hostname + "/node/api/password-policies"
response = requests.request("GET", url)
print(response.text)