Werk #22669: REST API: Fix crashes on incomplete notification method parameters
| Component | REST API | ||||
| Title | REST API: Fix crashes on incomplete notification method parameters | ||||
| Date | Nov 12, 2026 | ||||
| Level | Trivial Change | ||||
| Class | Bug Fix | ||||
| Compatibility | Compatible - no manual interaction needed | ||||
| Checkmk versions & editions |
|
Creating or editing a notification rule through the REST API failed with an internal server error (KeyError) in the following cases:
state_acknowledgementorstate_recoveryof the ServiceNow notification method had avaluewithoutstart_predefinedorstart_integer.state_downtimeof the ServiceNow notification method had an emptyvalueor avaluewith onlyend_predefinedorend_integer.management_typeof the ServiceNow notification method was sent withoutparams.enable_sync_smtpof the HTML email notification method had avaluewithoutportorauth.webhook_urlof the Cisco Webex Teams notification method orjira_urlof the Jira notification method was missing.
In the two state_downtime cases the rule was saved nevertheless.
Reading notification rules through the REST API then failed in the same way.
This also happened for rules saved in the Setup with a ServiceNow state that has no start state.
The REST API now behaves as follows:
- A
state_acknowledgementorstate_recoverywithout a start state, astate_downtimewith an emptyvalueand a missingwebhook_urlorjira_urlare rejected with status code 400. - A
state_downtimewith only an end state is accepted. - If
paramsis missing, all its fields get their default values. A missingportdefaults to 25 and a missingauthto disabled. - Rules with a ServiceNow state that has no start state can be read. A state that is stored without any value is returned as disabled.