API > Blacklist 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 "blacklisted" and explicitly allowed IPs are referred to as "whitelisted".

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 blocked please send it to support@expeditedsecurity.com and we will be happy to import it for you.

GET /api/blacklist_ips

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

Required Parameters

  • api_key - your API Key

Request Format

GET /api/blacklist_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/blacklist_ips/?api_key=YOUR-API-KEY

POST /api/blacklist_ip

Adds a blacklisted IP to the WAF instance.

Required Parameters

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

Request Format

POST /api/blacklist_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 blacklisted for 1 domain(s)."
}
Curl Formatted Example

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

DELETE /api/blacklist_ip

Removes a blacklisted IP from the WAF instance.

Required Parameters

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

Request Format

DELETE /api/blacklist_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 blacklist 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/blacklist_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.