Reply

Get all subnets without providing subnet address

Techie
Posts: 8
3459     0

Hi All,

 I am trying to get all subnets via infoblox api,  While it need to provide the subnets' address. For example

POST /wapi/v1.2/network?network=10.10.0.0/12

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?

Getting lists of IPv4 or IPv6 subnets

Adviser
Posts: 138
3460     0

You can get a list of all IPv4 subnets using a URL like

https://gm.example.com/wapi/v2.1/network

You can get a list of all IPv6 subnets using a URL like

https://gm.example.com/wapi/v2.1/ipv6network

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.

Showing results for 
Search instead for 
Did you mean: 

Recommended for You