Infoblox Exchange Cybersecurity Roadshow 2020 – Join us!
North America | Europe | Middle East/Africa | Asia-Pacific

API & Integration

Accepted Solution

Getting the next available subnet and reserving it

Posts: 4
1834     0



I have seen examples of how to get the next available IP and reserve it.  However I am looking for a way to get the next available network and reserve it/mark it as used with comments if possible.


I can obtain the next available subnet via the following API call



curl -k1 -u admin -X POST 'https://infoblox.local/wapi/v2.7/network network=func:nextavailablenetwork:,29'


However I'm not sure how to then reserve that entire subnet.


Many thanks.]


Re: Getting the next available subnet and reserving it

Posts: 122
1835     0



You can use the nextavailablenetwork function while creating a network, as shown below. This will create/reserve the network and add a comment to indicate that it is used.

curl -k -u admin:infoblox -H 'content-type: application/json' -X POST "https://grid-master/wapi/v2.7/network?_return_fields%2B=network,comment&_return_as_object=1" -d '{"network": "func:nextavailablenetwork:,default,24","comment": "Used"}'

Sample output:

    "result": {
        "_ref": "network/ZG5zLm5ldHdvcmskMTkyLjAuNS4wLzI0LzA:",
        "comment": "Used",
        "network": "",
        "network_view": "default"

Hope this is what you are looking for.

Showing results for 
Search instead for 
Do you mean 

Recommended for You