Werk #22666 · Nov 12, 26
REST API: Fix crash on notification rule fields enabled without value
Creating or editing a notification rule through the REST API failed with an internal server error (in most cases KeyError: 'value') if one of the following fields was sent with "state": "enabled" but without a value:
match_servicesandmatch_exclude_servicesin the conditionsmatch_syslog_priorityandmatch_syslog_facilityin the Event Console alert conditionthe_following_usersandrestrict_by_custom_macrosin the contact selectionnotification_bulkingandbulk_outside_timeperiodin its parametersurl_prefix_for_links_to_checkmkin the parameters of all notification methods that offer itfrom_details,reply_to,subject_for_host_notificationsandsubject_for_service_notificationsin the parameters of the HTML and ASCII email notification methodsinsert_html_section_between_body_and_tableandenable_sync_smtpin the parameters of the HTML email notification methodsyslog_facility_to_usein the parameters of the notification method that forwards to the Event Consoleresponsible_teams,actionsandtagsin the parameters of the Opsgenie and Jira Service Management Operations notification methodsadditional_respondersin the parameters of the Jira Service Management Operations notification methodstate_acknowledgement,state_downtimeandstate_recoveryin the management type parameters of the ServiceNow notification method
The REST API now rejects such requests with status code 400.
Details
- Class:
- Bug Fixes
- Level:
- Trivial
- Component:
- REST API
- Versions:
- 3.0.0b1Not yet releasedAll Editions
- 2.5.0p22All Editions