Alerting: Time intervals API (read only endpoints) (#81672)
* declare new API and models GettableTimeIntervals, PostableTimeIntervals * add new actions alert.notifications.time-intervals:read and alert.notifications.time-intervals:write. * update existing alerting roles with the read action. Add to all alerting roles. * add integration tests
This commit is contained in:
@@ -152,6 +152,8 @@ func (api *API) RegisterAPIEndpoints(m *metrics.API) {
|
||||
hist: api.Historian,
|
||||
}), m)
|
||||
|
||||
api.RegisterNotificationsApiEndpoints(NewNotificationsApi(api.MuteTimings), m)
|
||||
|
||||
// Inject upgrade endpoints if legacy alerting is enabled and the feature flag is enabled.
|
||||
if !api.Cfg.UnifiedAlerting.IsEnabled() && api.FeatureManager.IsEnabledGlobally(featuremgmt.FlagAlertingPreviewUpgrade) {
|
||||
api.RegisterUpgradeApiEndpoints(NewUpgradeApi(NewUpgradeSrc(
|
||||
|
||||
Reference in New Issue
Block a user