- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Delete network container and all sub objects via api
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Thanks!
Solved! Go to Solution.
Re: Delete network container and all sub objects via api
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.