API
The Gcore Customer Portal is being updated. Screenshots may not show the current version.
Web security
Web security
Chosen image
Home/Web security/FAQ/Get all banned IP addresses for all resources

How do I get a list of all banned IP addresses for all resources?

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?

Not a Gcore user yet?

Discover the all-in-one Web security solution by Gcore

Go to the product page