Skip to main content
Version: 10.1

Subnet Resource

Description​

This resource is for manipulating individual subnets that are associated with a zone for routing purposes.

GET /subnets/:ID​

Query for a specific subnet entry.

GET Parameters​

NameRequiredTypeDescriptionDefault Value
:IDYesURL ParameterThe unique numeric ID of the subnet entry. 

GET Response Values​

NameTypeDescription
subnet_resourceJSON StringThe subnet resource. Should match the resource used for the GET request.
subnetJSON StringThe IP address with subnet mask that is processed by the zone.
descriptionJSON StringAn optional description of the subnet.
zone_resourceJSON StringThe zone resource for the zone containing the subnet.
group_resourceJSON StringThe group resource that owns the zone with this subnet.
customer_resourceJSON StringThis value is deprecated and should not be used.

Example GET Request​

 GET /subnets/89910

Example GET Response​

{
"subnet_resource": "/subnets/89910",
"subnet": "207.168.0.0/24",
"description": "",
"zone_resource": "/zones/2031",
"group_resource": "/groups/279",
"customer_resource": "/customers/279"
}

PUT /subnets/:ID​

Update the given subnet. If changing the subnet, note that the subnet must be allowed for the zone per group routing policy.

warning

The two main subnets of the Default Zone (0.0.0.0/0 and ::/0) cannot be changed. This is to ensure there is always at least one set of rules to apply to incoming traffic.

PUT Parameters​

NameRequiredTypeDescriptionDefault Value
:IDYesURL ParameterThe unique numeric ID of the subnet to update. 
subnetNoJSON StringThe IP address and subnet mask you wish to change to. Accepts either IPv4 or IPv6 addresses. If the subnet mask is omitted it will default to /32 for IPv4 and /128 for IPv6. The specific subnet and mask used must be unique among all zones in rWeb (you can't use the same address in two different zones). 
descriptionNoJSON StringA description for this subnet. 

Example PUT Request​

PUT /subnets/89910
 
JSON Body:
{
"data" : {
"subnet" : "207.168.1.0/24",
"description" : "Changed main subnet."
}
}

Example PUT Response​

 HTTP/1.1 200 OK

DELETE /subnets/:ID​

Remove the subnet from the zone. Traffic for that prefix will be handled by the zone with the next most specific prefix, or by the Default Zone if there is no other matching prefix.

DELETE Parameters​

NameRequiredTypeDescriptionDefault Value
:IDYesURL ParameterThe unique numeric ID of the subnet entry to remove. 

Example DELETE Request​

DELETE /subnet/89910

Example DELETE Response​

 HTTP/1.1 200 OK