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.
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: */*
To the list of all Werks