Werk #16210 · Jan 11, 24
folder_config: Prevent unintentional deletion of a non-empty folder
Incompatible change. Existing setups may behave differently after upgrading. Review the details below before updating.
Prior to this Werk, the REST API could delete non-empty folders without any further check. With this Werk, the endpoint now accepts the delete_method query parameter. The possible values are: - recursive: Deletes the folder and all the elements it contains. - abort_on_nonempty: Deletes the folder only if it is not empty
If no delete_method is provided, recursive is asumed and the behaviour is the same as before this Werk.
The enpoint will return a 409 status code when trying to delete a folder that contains hosts, rules, subfolders or is referenced by another object.
Use example:
curl -X 'DELETE' 'http://example.com/my_site/check_mk/api/1.0/objects/folder_config/my_folder?delete_metod=abort_on_nonempty' -H 'accept: */*
Details
- Class:
- Bug Fixes
- Level:
- Trivial
- Component:
- REST API
- Versions:
- 2.4.0b1All Editions
- 2.3.0b2CommunityProUltimateUltimate + MT
- 2.2.0p26CommunityProUltimateUltimate + MT