API > Whitelist IP Endpoint

Overview

One of the most common uses of the WAF is to block and allow traffic based on specified IP addresses. 

Blocked IPs are referred to as being "black listed" and explicitly allowed IPs are referred to as "white listed".

This API endpoint lets you list, add and remove IP addresses from your IP rules. 

Important Notes

This endpoint is designed for adding serial usage (for example: blocking bad IP addresses via a webhook). It is not recommended to make API requests in parallel as this can cause unexpected behavior.  

If you have a large list of IPs to be allowed please send it to support@expeditedsecurity.com and we will be happy to import it for you.

GET /api/whitelist_ips

Requests the current values in the IP whitelist for the WAF instance.

Required Parameters

  • api_key - your API Key

Request Format

GET /api/whitelist_ips

Parameters

api_key=example-api-key

Response - HTTP 200 - application/json
[
	"70.161.42.62",
	"70.161.42.63",
	"70.0.0.0/24",
	"192.34.8.8",
	"192.34.55.44"
]

curl https://api.expeditedsecurity.com/api/whitelist_ips/?api_key=YOUR-API-KEY

POST /api/whitelist_ip

Adds a whitelisted IP to the WAF instance.

Required Parameters

  • api_key - your API Key
  • IP - the IP to be whitelisted

Request Format

POST /api/whitelist_ip

Form Parameters

api_key=YOUR-API-KEY&ip=192.293.93.44

Response - HTTP 200 - application/json
{
	"domain": "example.com",
	"success": true,
	"message": "IP address 192.34.55.78 whitelisted for 1 domain(s)."
}
Curl Formatted Example

curl -d "api_key=YOUR-API-KEY&ip=192.34.55.78" https://api.expeditedsecurity.com/api/whitelist_ip

DELETE /api/whitelist_ip

Removes a whitelisted IP from the WAF instance.

Required Parameters

  • api_key - your API Key
  • IP - the IP to be whitelisted

Request Format

DELETE /api/whitelist_ip

Form Parameters

api_key=YOUR-API-KEY&ip=192.293.93.44

Response - HTTP 200 - application/json
{
	"domain": "sendcheckit.com",
	"success": true,
	"message": "The IP address 192.34.55.78 was removed from the whitelist for 1 domain(s)."
}
Curl Formatted Example
curl -X "DELETE"-d "api_key=YOUR-API-KEY&ip=192.34.55.78" https://api.expeditedsecurity.com/api/whitelist_ip

API Help

We're happy to help you build whatever functionality you need with the API.

Please don't hesitate to :

We are a team of developers and sysadmins who are can help troubleshoot and debug whatever API interactions you need to create.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.