API
The Gcore Customer Portal is being updated. Screenshots may not show the current version.
Web Application Security
Web Application Security
Chosen image
Home/Web Application 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 Application 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
// // Initialize a variable to undefined initially. // var growthBook = undefined; // (function() { // try { // var script = document.createElement('script'); // script.src = "https://cdn.jsdelivr.net/npm/@growthbook/growthbook/dist/bundles/auto.min.js"; // script.setAttribute("data-api-host", "https://cdn.growthbook.io"); // script.setAttribute("data-client-key", "sdk-truekA5wvhMYaqsu"); // document.head.appendChild(script); // script.onload = function() { // console.log("GrowthBook script loaded successfully."); // growthBook = window.GrowthBook; // Assuming GrowthBook attaches itself to window // }; // script.onerror = function() { // console.error("Failed to load the GrowthBook script."); // growthBook = undefined; // Explicitly set to undefined on error // }; // } catch (error) { // console.error("An error occurred while setting up the GrowthBook script:", error); // growthBook = undefined; // } // })(); // // Optional: Push to dataLayer if needed // window.dataLayer = window.dataLayer || []; // window.dataLayer.push({ // 'event': 'scriptLoadStatus', // 'growthBookStatus': growthBook ? "Loaded" : "Failed" // });