09-06-2022 10:23 AM - edited 09-06-2022 10:23 AM
Wanted to see if there was certain flag or if there is an example of how i can delete a network container and all of the other sub objects within it via the API
I have been able to do this when the network container is empty and I am just deleting the container, but not able to when there are object in it...
From the UI you get a pop up that gives you this option. how can you do this via the api?
Solved! Go to Solution.
09-09-2022 09:01 AM
By default, child objects should be deleted with the container. There is an opotion you can set explicitly for this, as hown in this example:
curl -k -u admin:pwd -X DELETE "https://IP_ADDRESS/wapi/v2.10/networkcontainer/NETWORKCONTAINER_REF/default?remove_subnets=true"
The "remove_subnets=true" can be set to false if you want to reparent child objects.