07-02-2018 09:04 AM
I' am trying to get a list of all subnets in /24 format from all networks within IPAM. I have a large number of networks which are /23, /22 and /21 and I need to extract a csv list as shown below (example network 10.0.0.0/22) .
Thanks in advance.
07-02-2018 09:10 AM
You can search for networks based on their netmask.
Here is the WAPI call
Here is a sample curl command.
curl -k -u admin:Infoblox -X GET "https://grid-master/wapi/v2.7/network?network~=.0/24"
Hope this helps,
07-02-2018 09:58 AM
Thanks for the reply.
The sample code will only return networks configured to /24 and doesn't return networks configured to /23, /22 and /21.
What I' am looking for is a list of all /24 networks and also some way of extracting all /24 ranges within /23, /22 and /21.So if I have a network 10.0.0.0/22 in IPAM, I want the script to output the below data.
07-02-2018 11:52 AM
For regular expression searches, only the IPv4 Address portion is supported. Searches for the CIDR portion is always an exact match.
To get the /24 within a network container, you can pass on the container information in the WAPI call as below.
curl -k -u admin:infoblox -X GET "https://grid-master/wi/v2.7/network?network~=.0/24&network_container=10.0.0.0/22"