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

Component REST API
Title host_config: update endpoint now only allows one of replace, update or delete
Date Aug 7, 2023
Checkmk Edition Checkmk Raw (CRE)
Checkmk Version 2.2.0p9 2.3.0b1
Level Trivial Change
Class Bug Fix
Compatibility Incompatible - Manual interaction might be required

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"],

To the list of all Werks