Are you interested in our Early Access Program (EAP)? This program allows you to preview code, test in your lab and provide feedback prior to General Availability (GA) release of all Infoblox products. If so, please click the link here.

NIOS DNS DHCP IPAM

Reply

API call to find the parent container for a network

Member
Posts: 1
686     1

I was looking for an API call to get the parent container details for a existing network in DHCP/IPAM.

 

To elaborate more, say I have a network named 10.41.1.0/24. I need to get the parent container for the same (eg: 10.41.0.0/16) by querying with the network CIDR.

 

Is it possible to get this?

Re: API call to find the parent container for a network

Superuser
Posts: 31
687     1

Hi JMZ991,

 

You can fetch the parent container details by appending "_return_fields=network_container" to your query.

 

Below is an sample curl command for your given example

curl --location --request GET 'https://<grid-master>/wapi/v2.12/network?network~=10.41.1.0/24&_return_fields%2b=network_container' \
--header 'Authorization: Basic YWRtaW46aW5mb2Jsb3g='
Shukran

Re: API call to find the parent container for a network

Techie
Posts: 4
687     1

Hi Everyone, 

 

In the same concept, what is the API to get only the network container with the extensible attributes? A container without any network. 

 

I can do a GET in a network container if I have a network that belongs to the same container. But I cannot do the GET in the container itself. 

 

Thanks, Dan

Re: API call to find the parent container for a network

Superuser
Posts: 40
687     1

To find a network container, you specify the object type as networkcontainer instead of network. For example, the following curl command will return network container(s) with EA of Site equal to HQ.

 

curl -k -u <username>:<password> -X GET "https://<grid-master>/wapi/v2.12/networkcontainer?_return_fields%2B=extattrs&*Site%3A=HQ&_return_as_object=1"
Showing results for 
Search instead for 
Did you mean: 

Recommended for You

Demo: Infoblox IPAM plug-in integration with OpenStack Newton