SSO Login is being implemented on this site. Existing users: Your existing password must be reset the first time you login using SSO. Click here to reset your password first before login. Your new username will be your email.

API & Integration, DevOps,NetOps,SecOps


Multiple IPs and Subnet Object Ref

Posts: 2
293     1

The following Python code works to reserve the next available IP excluding a list of IPs (though I would prefer to use a range vs individual IPs).

What doesn't work is having it reserve\return multiple IPs.  I believe I am adding the Num: parameter in the correct place, but it still only reserves 1.

I am also curious how this call might actually return the subnet ref object name, so I could use that to grab the router, dns, and other option info in a subesquent call.

Thanks for any help!

Code -

ibx_ip_request_url ...../record:host?_return_fields%2B=name,ipv4addrs

'name': host_name,
'ipv4addr': {
'_object_function': 'next_available_ip',
'num': 5,
'exclude': exclude_ip,},
'_result_field': 'ips',
'_object' : 'network',
'network': request_subnet,}
}, auth=(ibx_user, ibx_pass), json=body, headers=ibx_headers, verify=False

Re: Multiple IPs and Subnet Object Ref

Posts: 17
294     1

It looks like you are trying to run the function against a Host object. "nextavailableip" is a function of the network object. And I believe the "exclude" parameter needs to be an array (list) of IP addresses. Regardless of how many IP addresses you request, the result should be an array (list) that looks like this:

ips: [





aRe: Multiple IPs and Subnet Object Ref

Posts: 2
294     1

Thanks for the reply. I should have written it better.  The script works for everything but getting multiple IPs.  I'm passing in the host name, exclude list (which is a list of 20 IPs), requested subnet, wapi url and headers.

The primary question I have is where to put the "num" parameter to get more than one IP for a given host. In its current form I get no error and do get the next IP in the subnet after the exclusion list.


Examples of the objects I'm passing in for clarity
host_name = ''
exclude_ip = ['','']
network = ''

Returns ''

should return, - .7


Re: aRe: Multiple IPs and Subnet Object Ref

Posts: 17
294     1

The 'num' should be part of the parameter, so your original code should work. The following curl command works for me (swap out xxxx with your network reference):


$ curl -k -u admin:infoblox -H 'Content-Type:application/json' -X POST \



  "ips": [

Showing results for 
Search instead for 
Did you mean: 

Recommended for You

Businesses are investing heavily into securing company resources from cyber-attacks form cybercrimin