You can get a list of all banned IP addresses for all Web Security product resources using an API request:
// @name Get protected ip addresses
GET https://api.gcore.com/security/resources
Authorization: Bearer {{token_client}}
Content-Type: application/json
> {%
let ip_list = [];
for (let resource of response.body) {
for (let item of resource["whitelists"]) {
ip_list.push(item["whitelist_data"]);
}
}
client.log(ip_list);
%}
Was this article helpful?
Discover the all-in-one Web security solution by Gcore