03-16-2022 03:13 AM
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?
03-18-2022 02:54 AM
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='