Werk #16210: folder_config: Prevent unintentional deletion of a non-empty folder

Komponente REST API
Titel folder_config: Prevent unintentional deletion of a non-empty folder
Datum 11.01.2024
Checkmk-Version 2.4.0b1 2.3.0b2 2.2.0p26
Level Kleine Änderung
Klasse Bugfix
Kompatibilität Inkompatibel - Manuelle Interaktion könnte erforderlich sein
Affected Editions
2.4.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.3.0b2 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.2.0p26 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

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: */*

Zur Liste aller Werks