Introducing SOC Insights for BloxOne Threat Defense: Boost your SOC efficiency with AI-driven insights to eliminate manual work and accelerate investigation and response times. Read the blog announcement here.

API & Integration, DevOps,NetOps,SecOps

Reply

How to get a list of network containers that are not inside of another network container?

New Member
Posts: 1
906     0

Hello,

 

I am trying to use the API to get a list of all network containers that are not inside of another network container. I can see that these containers can be identified by the fact that the "network_container" attribute has a "/" as a value. Making it clear that the container does not have a parent container.

 

Example:

 

[{
"_ref": "networkcontainer/<id>",
"comment": "Parent container",
"network": "192.168.0.0/16",
"network_container": "/",   <- No network here, so this container is not inside another one.
"network_view": "default"
},

{
"_ref": "networkcontainer/<id>",
"comment": "Child container",
"network": "192.168.1.0/20",
"network_container": "192.168.0.0/16",
"network_view": "default"
}]

 

Example of the query I used (highlighted the important part):

 

https://<infoblox_instance>/wapi/<version>/networkcontainer?network_container=/&_return_fields+=network_container

 

I would expect this call to return a list of all network container objects that are not inside of another container. But using this "/" as a search query results in an error. It seems like the field only accepts values shaped as CIDR notated networks.

 

Does anyone know how I can create a query that returns only the network containers that are not inside of another network container?

/Re: How to get a list of network containers that are not inside of another network container?

Superuser
Posts: 17
906     0

I am not sure if this works, but it's worth a shot. (If I have time today, I will see if I can try it on my end too).

 

But instead of using /, try using the URL Encoded value for /, which is: %2F

Showing results for 
Search instead for 
Did you mean: 

Recommended for You