Infoblox’s global team of threat hunters uncovers a DNS operation with the ability to bypass traditional security measures and control the Great Firewall of China. Read about “Muddling Meerkat” and the many other threat actors discovered by Infoblox Threat Intel here.

API & Integration, DevOps,NetOps,SecOps


Curl - Get Next Available IP

New Member
Posts: 1
2202     0



We would like to use script to get the next available IP from a subnet "". From the refernece guide, the script should be:


curl -k -u admin:infoblox -H 'content-type: application/json' -X POST "https://gridmaster/wapi/v2.11/network/ZG5zLm5ldHdvcmskMTcyLjIxLjEwLjAvMjQvMA:
=next_available_ip&_return_as_object=1" -d '{"num":1}'


I know "ZG5zLm5ldHdvcmskMTcyLjIxLjEwLjAvMjQvMA:1921.168.1.1/24/default" is the object reference of the subnet


However, how I can get this object reference and then pass as parameter to the above command? 


Great if anyone can share the sample for this.








Re: Curl - Get Next Available IP

Posts: 181
2203     0



You can combine multiple WAPI calls to achieve your requirement using the /request handler:

curl -X POST 'https://grid-master/wapi/v2.11/request' \
-k -u uname:pwd \
-H 'Content-Type: application/json' \
-d '[
		"method": "GET",
		"object": "network",
			"network_ref": "_ref"
        "discard": true
		"method": "POST",
		"object": "##STATE:network_ref:##",
			"_function": "next_available_ip"
		"enable_substitution": true



Showing results for 
Search instead for 
Did you mean: 

Recommended for You