- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
How to get a list of network containers that are not inside of another network container?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2023 07:56 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 05:48 AM
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