[//]: # (werk v2)
# folder_config: Prevent unintentional deletion of a non-empty folder
key | value
---------- | ---
date | 2024-01-11T09:34:55+00:00
version | 2.3.0b2
class | fix
edition | cre
component | rest-api
level | 1
compatible | no
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: */*`
Show replies by date