Zone Source Allow List Revision Resource
Description
This resource is for manipulating zone source allow list entries by revision number. Any changes made to a zone's allow list configuration increment the revision number. You can check the current revision of a zone with the current revision resource.
GET /zones/:ZONEID/revisions/:REVISIONID/src_allow_lists
Query all the source allow list entries for a zone at a particular revision. This is a paged query that uses the "sort_list" functionality.
GET Parameters
| Name | Required | Type | Description | Default Value |
|---|---|---|---|---|
| :ZONEID | Yes | URL Parameter | The unique numeric ID of the zone. | |
| :REVISIONID | Yes | URL Parameter | The revision number of the source allow list set. | |
| q | No | Query Parameter | Filter returned entries in the revision by their ip, asn, cc or traffic type. |
GET Response Values
Each element in the data array will be an object representation of the source allow list resource that is used in the zone. In addition to this and the paged query elements, it will return "total_subnet_count", which is the total number of source allow list prefix resources that are consumed by all entries.
Example GET Request
GET /zones/2031/revisions/20/src_allow_lists
Example GET Response
{
"data": [
{
"id": 115116635,
"data": "8.8.8.8/32",
"list_type": "prefix",
"count": 1,
"zone_id": 2031,
"traffic_type": "ALL",
"description": "Let all the Google traffic flow.",
"src_allow_list_resource": "/src_allow_lists/115116635",
"zone_resource": "/zones/2031",
"customer_resource": "/customers/279",
"group_resource": "/groups/279"
}
],
"rows": 1,
"total_subnet_count": 1
}
POST /zones/:ZONEID/revisions/:REVISIONID/src_allow_lists
Create a new set of source allow list entries to use in the zone. Any entries created will be in addition to existing source allow list entries in the zone. The POST will only be accepted if the :REVISIONID is the current source allow list revision for the zone.
If more than 20 entries are being created at one time, this will be run as a "bulk import" background job. For consistency, the imported parameter can be used to force this behavior even when inserting 20 or less entries.
POST Parameters
| Name | Required | Type | Description | Default Value |
|---|---|---|---|---|
| :ZONEID | Yes | URL Parameter | The unique numeric ID of the zone you want to add source allow list entries. | |
| :REVISIONID | Yes | URL Parameter | The revision number of the source allow list set. In order to successfully perform the POST, this must be the zone's current source allow list revision number. | |
| imported | No | JSON Boolean | If present, always run this create as a background job. | |
| array | Yes | JSON Array | An array containing an object for each individual source allow list you want to add. The following entries in this table detail the source allow list object, see also the requirements to update an individual source allow list entry. | |
| data | Yes | JSON String | The 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_type | Yes | JSON String | The type that is being allow listed. Entries can only be created using types prefix, asn or cc. | |
| description | No | JSON String | An optional description to use. | |
| traffic_type | Yes | JSON String | The type of traffic to allow. Must be one of TCP, UDP, ICMP, or ALL. |
Example POST Request
POST /zones/2031/revisions/20/src_allow_lists
JSON Body:
{
"data": {
"array": [
{
"data": "8.8.4.4",
"list_type": "prefix",
"traffic_type": "ALL",
"description": "Another common DNS server."
}
]
}
}
Example POST Response
HTTP/1.1 201 Created
DELETE /zones/:ZONEID/revisions/:REVISIONID/src_allow_lists
Remove source allow list entries from the zone. If using the query parameter, this will only delete entries that match the query, otherwise all entries will be removed.
DELETE Parameters
| Name | Required | Type | Description | Default Value |
|---|---|---|---|---|
| :ZONEID | Yes | URL Parameter | The unique numeric ID of the zone. | |
| :REVISIONID | Yes | URL Parameter | The revision number of the source allow list set. In order to successfully perform the DELETE, this must be the zone's current source allow list revision number. | |
| q | No | Query Parameter | Delete entries in the revision by matching "ip", "asn", "cc" or "traffic_type". |
Example DELETE Request
DELETE /zones/2031/revisions/23/src_allow_lists
Example DELETE Response
HTTP/1.1 200 OK