Werk #15968: host_config: update endpoint now only allows one of replace, update or delete

Komponente REST API
Titel host_config: update endpoint now only allows one of replace, update or delete
Datum 07.08.2023
Checkmk Edition Checkmk Raw (CRE)
Checkmk-Version 2.2.0p9 2.3.0b1
Level Kleine Änderung
Klasse Bugfix
Kompatibilität Inkompatibel - Manuelle Interaktion könnte erforderlich sein

Previously when calling update host, 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 host or bulk update host.

For update_host, previously you could to the following

{
    "attributes": {"ipaddress": "192.168.9.123"},
    "update_attributes" {"ipaddress": "192.168.0.124"},
    "remove_attributes": ["tag_foobar],
}

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

{
    "attributes": {"ipaddress": "192.168.9.123"},
}

OR

{
    "update_attributes": {"ipaddress": "192.168.9.124"},
}

OR

    "remove_attributes": ["tag_foobar"],

Zur Liste aller Werks