API & Integration

Reply
Highlighted
Accepted Solution

Get details on network (linked dhcpmembers and dhcp ranges)

me_62
Techie
Posts: 1
1660     0

Hi,

 

I managed to use the API to get the _ref for an exisitng network using

 

https://1.2.3.4/wapi/v2.3.1/network?network=2.3.4.0

 

_ref looks like this : network/aaaaaaaaaaaaaaaaaaaaaaaaaaaa:2.3.4.0/27/yyy-zz"

 

How do I use this for additional queries to get the following information :

 

- to which dhcpmembers is the network linked

- which dhcp ranges are defined for this network

 

Help is appreciated,

 

me_62

Re: Get details on network (linked dhcpmembers and dhcp ranges)

[ Edited ]
Adviser
Posts: 147
1661     0

Hello,

 

You will need to pull the network centric and range centric details separately but here are a couple of examples for what you can do:

 

https://1.2.3.4/wapi/v2.3.1/network/aaaaaaaaaaaaaaaaaaaaaaaaaaaa?_return_fields=members

 

The above will return the DHCP members associated with the specific network you are referencing.

 

This next example will return the members via the initial call as you do not need to determine the reference first:

 

https://1.2.3.4/wapi/v2.3.1/network?network=2.3.4.0&_return_fields=members

 

To find the associated ranges you will need to query the ranges and filter on the network like this:

 

https://1.2.3.4/wapi/v2.3.1/range?network=2.3.4.0

 

I hope that helps!

Check out our new Tech docs website at http://docs.infobox.com for latest documentation on Infoblox products

Re: Get details on network (linked dhcpmembers and dhcp ranges)

Adviser
Posts: 82
1661     0

You need to add _return_fields=<field>

 

https://1.2.3.4/wapi/v2.3.1/network?network=2.3.4.0&_return_fields=members

 

To get the dhcp ranges you would need to execute

 

https://1.2.3.4/wapi/v2.3.1/range?network~=2.3.4.0

 

Re: Get details on network (linked dhcpmembers and dhcp ranges)

GHorne Community Manager
Community Manager
Posts: 254
1661     0

the '_ref' is really only needed when you want to get back to that specific object (e.g. to modify, or delete it)

 

And it will be faster to get that object than using a search.

 

But the refs can change over time, so don't hardcode them anywhere, or be careful when caching search results.

Showing results for 
Search instead for 
Do you mean 

Recommended for You