WAPI Get all ipv4address for multiple network in batch

Posts: 2
4072     0



I started a script in python to get all ipv4address from all networks in the database. My requirement is to get a list of static IP addresses as well as all DHCP leases. The object ipv4address seems to be good for this requirement. 


My problem is that we have more than 10000 networks. When I send a GET requesting ipv4address for a specific network it takes 5 seconds for the Infoblox to respond. So going through all networks should take approximately 15 hours.


Is there a way to request "ALL" ipv4address wihout specifying the network?  Or is there a way to send a request and filter on multiple networks in order to send a kind of bulk request?


I tried this but it only returns me the last specified network...


Can we do a kind of "OR" condition while specifying the filter like: "/ipv4address?network=|network="    ?





Re: WAPI Get all ipv4address for multiple network in batch

Community Manager
Community Manager
Posts: 248
4073     0

You're pulling too much data from the database, and will overload the system trying, that's why we restrict you to chunks of data inside some other object.


Since this is a bulk data export, you better off using CSV export or other methods (not all of which are supported by the WAPI).


How often do you need this data, and why? Knowing that will help steer you towards a more efficient solution.


Oh, and what do you mean by 'static IP address' is that just the list of all fixed addresses?

Re: WAPI Get all ipv4address for multiple network in batch

Posts: 2
4073     0



I want to extract all networks and their IP addresses (including DHCP lease) and export the data to CSV. CSV files are then sent to people who will be running other scripts to do whatever they want to do with the data. I want to automate this and run it once a week. 



As an alternative way, right now my script is polling "network", "record:host", "record:host_ipv4addr", "lease" and putting "_max_results=-500000". It takes approximately 30-40 minutes to run. I saw CPU increasing by approx 35%.


I think if I could have had all ipv4_address, it could have replaced the last 3 objects. If I could send request for let say 100 networks at once, I could do a For loop to gather all my networks and it should significantly reduce the amount of time it takes. But I didn't find a way to do it so far.


I'm not too familiar with Infoblox object naming so by "static IP" I mean an IP that is not assigned by DHCP. It could be an IP reserved to a server. I think it is a "host record"...


I'm opened to any better suggestion you may have.


Thanks for yor help!


Showing results for 
Search instead for 
Did you mean: 

Recommended for You