# list_active_evoshield_rules
The EvoShield list_whitelist GET endpoint returns a list of currently whitelisted IPs for the service.
Parameters
account: The account key - which can be found in the Settings area of the Evolution Host client area: https://evolution-host.com/controlPanelservice_key: The unique key for the particular Evolution Host service being used in this API call - Can be found by using the /list_services API endpointResponse
The response is an array of JSON arrays containing the IPs which are currently whitelisted for each IP assigned to the service.
If Cloudflare's IP ranges have been whitelisted, the array will contain a “CLOUDFLARE” entry.
$url = "https://evolution-host.com/api.php";
$action = "list_whitelist";
$callData = http_build_query([
'account' => 'YOUR_ACCOUNT_KEY', //Obtain key from the Evolution Host client panel
'service_key' => 'YOUR_SERVICE_KEY', //Obtain key from the /list_services API endpoint
'action' => $action,
]);
$ch = curl_init($url . '?' . $callData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPGET, true);
$result = curl_exec($ch);
if($result != false)
{
$result = json_decode($result);
if(json_last_error() !== JSON_ERROR_NONE)
{
echo 'JSON Error: ' . json_last_error_msg();
}
echo '<pre>' . json_encode($result, JSON_PRETTY_PRINT) . '</pre>';
}
curl_close($ch);
Example Response
In this example, 1.2.3.4 is the IP address assigned to the EvoShield service. 8.8.8.8 and 5.5.5.5 are whitelisted, in addition to Cloudflare's IP address ranges.
{
"1.2.3.4": [
"8.8.8.8",
"CLOUDFLARE",
"5.5.5.5"
]
}