Forum Discussion
4 Replies
Never seen an API call that could delete all objects.
But if you just want to do this once you can just replace the "/config/partitions/[partition name]/bigip.conf" with an empty file and run "tmsh load sys config". Then remove the partition in the UI.
/Patrik
- Mudpuppy_182361Nimbostratus
Hmm. Good idea. Not sure how I would automate it. Also It may leave dangling ssl certs / etc on the file system.
Thank you for the information.
- jstaff_333301Nimbostratus
There should be a direct way to do this. Many of the function calls require you to filter out the objects of a partition you want to delete then do a bunch of non-sense to delete all of them.
There should be a call that deletes all objects owned by a partition. Then deletes the partition itself.
On my phone now so can't verify this. Be careful and make sure you have good parameter validation when using it.
$ curl -sk -u 'admin:admin' -H 'Content-Type: application/json' -X POST \ -d '{"command": "run", "utilCmdArgs": "-c \"rm /config/partitions/mypartition/bigip.conf\""}' \ https://$HOST/mgmt/tm/util/bash | jq
/Patrik