Skip to main content
Version: 10.0

Block List Resource

Description​

This resource is for manipulating individual block list entries in a zone. To create block list entries or modify in bulk, see the Zone Block List Revision Resource

GET /block_lists/:ID​

Query an individual block list entry.

GET Parameters​

NameRequiredTypeDescriptionDefault Value
:IDYesURL ParameterThe unique numeric ID of the block list entry. 
globalNoQuery ParameterWhen querying the Default Zone (zone ID 0), can be set to true to return global block list entries. By default only normal block list entries will be returnedfalse

GET Response Values​

NameTypeDescription
dataJSON StringThe configuration value for this entry, based on its list type:
prefix- IPv4 or v6 string, with optional CIDR mask
asn- The Autonomous System Number
cc- The Country Code
shared- The display name of the shared list
list_typeJSON StringThe type that is being block listed. Each block list entry will only return one of these values: prefix, asn, cc, or shared.
countJSON NumberThis is the number of block list prefix resources that are consumed by this block list entry. Individual prefixes will always have a count of 1. ASN, CC, or shared list entries will depend on the size of their respective entities.
idJSON NumberThe ID of the block list entry. Should correspond to the :ID used in the GET request.
zone_idJSON NumberThe ID of the zone that contains this block list entry.
global_listJSON BooleanWhether or not this entry is a global block list. Will only be returned true when specifically querying global entries against the Default Zone.
exceptedJSON BooleanWhether or not this entry is a block list exception entry.
descriptionJSON StringA description for this block list entry. May contain information that alters the block list entry's behavior. See the sections on global block lists and block list exceptions for more information.
expiry_timeJSON StringThe time this entry will expire. If "Infinity", the block list has no set expiration time.
block_list_resourceJSON StringThe block list resource. Should correspond the resource used in the GET request.
zone_resourceJSON StringThe zone resource for the zone that contains this block list entry.
customer_resourceJSON StringThis value is deprecated and should not be used.
group_resourceJSON StringThe group resource that owns the zone containing this block list entry.

Example GET Request​

GET /block_lists/1921971 

Example GET Response​

{
"data": "8.8.8.8/32",
"list_type": "prefix",
"count": 1,
"id": 1921971,
"zone_id": 2515,
"global_list": false,
"excepted": false,
"description": "Duplicates testing",
"expiry_time": "Infinity",
"block_list_resource": "/block_lists/1921971",
"zone_resource": "/zones/2515",
"customer_resource": "/customers/545",
"group_resource": "/groups/545"
}

PUT /block_lists/:ID​

Update a block list entry. The block list entry must be part of the current zone revision in order to do this.

PUT Parameters​

NameRequiredTypeDescriptionDefault Value
:IDYesURL ParameterThe unique numeric ID of the block list entry to update. 
dataYesJSON StringThe configuration value for this entry, based on its list type:
prefix- IPv4 or v6 string, with optional CIDR mask
asn- The Autonomous System Number
cc- The Country Code
list_typeYesJSON StringThe type that is being block listed. Entries can only be updated using types 'prefix', 'asn' or 'cc'.
descriptionNoJSON StringThe new description to use. 
expiry_timeYesJSON StringThe new expiration time, in ISO 8601 format (UTC). If you don't want the block list to expire, use "Infinity". 

Example PUT Request​

PUT /block_lists/1921971
 
JSON Body:
{
"data" : {
"data":"65.23.3.0/24",
"list_type":"prefix",
"description" : "Updating description with API.",
"expiry_time" : "Infinity"
}
}

Example PUT Response​

HTTP/1.1 200 OK

DELETE /block_lists/:ID​

Remove a block list entry. The block list entry must be part of the current zone revision in order to do this.

DELETE Parameters​

NameRequiredTypeDescriptionDefault Value
:IDYesURL ParameterThe unique numeric ID of the block list entry to be removed. 

Example DELETE Request​

 DELETE /block_lists/201876

Example DELETE Response​

 HTTP/1.1 200 OK