06-09-2015 07:51 PM
I am trying to get all subnets via infoblox api, While it need to provide the subnets' address. For example
So I need to create a cofig file and put all the network address (10.0.0.0/12) in it and get all the subnets. But when server have update the network set,for example, add a network address, I need to update my config file also, this is wired. cause I may do not know which network address has been added.
1, Is there a way to get all subnets without provide the subnet address?
2, if question 1 is not easy to solve, Is there a smart way to know which subnet has been added automatically via api?
06-10-2015 03:40 AM
You can get a list of all IPv4 subnets using a URL like
You can get a list of all IPv6 subnets using a URL like
For example, a Curl command like the following will return a list of all IPv4 subnets displayed in XML format:
curl --tlsv1 --insecure --user 'admin:infoblox' 'https://gm.example.com/wapi/v2.1/network?_return_type=xml'
(If you'd like the list nicely formatted use
_return_type=xml-pretty instead of
_return_type=xml.) I have not tried this myself, but I believe that you can take the output from the above command and import it directly into Microsoft Excel for Windows.