Get All Password Policies
Gets all password policies, available to clients.
Request
HTTP Request
Request body
Request body is empty.
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,
"id": "635a5b5425bb8a49371f3f92"
},
...
]
Example
Request
let login = <...>
let password = <...>
let saymonHostname = <...>
let path = "/node/api/password-policies";
let auth = "Basic " + btoa(login + ":" + password);
let headers = new Headers();
headers.append("Authorization", auth);
let requestOptions = {
method: "GET",
headers: headers
};
fetch(saymonHostname + path, requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log("error", error));
const http = require("http");
let login = <...>
let password = <...>
let saymonHostname = <...>
let path = "/node/api/password-policies";
let auth = "Basic " + Buffer.from(login + ":" + password).toString("base64");
let options = {
"method": "GET",
"hostname": saymonHostname,
"headers": {
"Authorization": auth
},
"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();
Response
[
{
"name": "Default",
"length": 1,
"minLowercase": 0,
"minCapital": 0,
"minDigits": 0,
"minSpecial": 0,
"id": 1
},
{
"name": "Password Policy",
"length": 32,
"minLowercase": 4,
"minCapital": 1,
"minDigits": 4,
"minSpecial": 2,
"id": "635a5b5425bb8a49371f3f92"
},
...
]