Werk #16384: notification rule: allow for non builtin service levels

Component REST API
Title notification rule: allow for non builtin service levels
Date Jan 17, 2024
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.0p21 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

When configuring a notification rule via the Rest API, you could not set the value for "match_service_levels" to anything but the default service levels. This werk addresses this issue by now allowing any of the service levels configured to be used. This change mean that there is a change to the request schema. Previously, we accepeted the service level string value, whereas now we accept the integer value.

Previous schema

{"match_service_levels": {
    "state": "enabled",
    "value": {"from_level": "silver", "to_level": "gold"}
    }
}

New schema

{"match_service_levels: {
    "state": "enabled",
    "value": {"from_level": 10, "to_level": 20}
    }
}

To the list of all Werks