Werk #15888: folder_config: update endpoint now requires which update option you want

Component REST API
Title folder_config: update endpoint now requires which update option you want
Date Jun 7, 2023
Level Trivial Change
Class Bug Fix
Compatibility Incompatible - Manual interaction might be required
Checkmk versions & editions
2.3.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.2.0p7 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

Previously when calling update folder, you could pass any combination of

replace all attributes update some attributes delete some attributes

Some of these combinations didn't make much sense and could lead to errors. This werk simplifies this by only allowing one of the options when calling update folder or bulk update folders.

For update_folder, previously you could do the following

{
    "title": "Virtual Servers.",
    "attributes": {"tag_networking": "wan"},
    "update_attributes": {"tag_criticality": "prod"},
    "remove_attributes": ["tag_foobar"],
}

This werk modifies this behaviour by forcing the client to select only one action.

{
    "title": "Virtual Servers.",
    "attributes": {"tag_networking": "wan"},
}

OR

{
    "title": "Virtual Servers.",
    "update_attributes": {"tag_criticality": "prod"},
}

OR

{
    "title": "Virtual Servers.",
    "remove_attributes": ["tag_foobar"],
}

To the list of all Werks