Alerting: Remove transitional notifications API endpoints (#102713)
* Remove transitional notifications API endpoints * Fix openapi spec * Fix path test * Remove API tests related to removed endpoints
This commit is contained in:
@@ -1,62 +0,0 @@
|
||||
package definitions
|
||||
|
||||
// swagger:route GET /v1/notifications/receivers/{Name} notifications RouteGetReceiver
|
||||
//
|
||||
// Get a receiver by name.
|
||||
//
|
||||
// This API is designated to internal use only and can be removed or changed at any time without prior notice.
|
||||
//
|
||||
// Deprecated: true
|
||||
// Responses:
|
||||
// 200: GetReceiverResponse
|
||||
// 403: PermissionDenied
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route GET /v1/notifications/receivers notifications RouteGetReceivers
|
||||
//
|
||||
// Get all receivers.
|
||||
//
|
||||
// This API is designated to internal use only and can be removed or changed at any time without prior notice.
|
||||
//
|
||||
// Deprecated: true
|
||||
// Responses:
|
||||
// 200: GetReceiversResponse
|
||||
// 403: PermissionDenied
|
||||
|
||||
// swagger:parameters RouteGetReceiver
|
||||
type GetReceiverParams struct {
|
||||
// in:path
|
||||
// required: true
|
||||
Name string `json:"name"`
|
||||
// in:query
|
||||
// required: false
|
||||
Decrypt bool `json:"decrypt"`
|
||||
}
|
||||
|
||||
// swagger:parameters RouteGetReceivers
|
||||
type GetReceiversParams struct {
|
||||
// in:query
|
||||
// required: false
|
||||
Names []string `json:"names"`
|
||||
// in:query
|
||||
// required: false
|
||||
Limit int `json:"limit"`
|
||||
// in:query
|
||||
// required: false
|
||||
Offset int `json:"offset"`
|
||||
// in:query
|
||||
// required: false
|
||||
Decrypt bool `json:"decrypt"`
|
||||
}
|
||||
|
||||
// swagger:response GetReceiverResponse
|
||||
type GetReceiverResponse struct {
|
||||
// in:body
|
||||
Body GettableApiReceiver
|
||||
}
|
||||
|
||||
// swagger:response GetReceiversResponse
|
||||
type GetReceiversResponse struct {
|
||||
// in:body
|
||||
Body []GettableApiReceiver
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package definitions
|
||||
|
||||
// swagger:route GET /v1/notifications/time-intervals notifications RouteNotificationsGetTimeIntervals
|
||||
//
|
||||
// Get all the time intervals
|
||||
//
|
||||
// This API is designated to internal use only and can be removed or changed at any time without prior notice.
|
||||
//
|
||||
// Deprecated: true
|
||||
// Responses:
|
||||
// 200: GetAllIntervalsResponse
|
||||
// 403: ForbiddenError
|
||||
|
||||
// swagger:route GET /v1/notifications/time-intervals/{name} notifications RouteNotificationsGetTimeInterval
|
||||
//
|
||||
// Get a time interval by name.
|
||||
//
|
||||
// This API is designated to internal use only and can be removed or changed at any time without prior notice.
|
||||
//
|
||||
// Deprecated: true
|
||||
// Responses:
|
||||
// 200: GetIntervalsByNameResponse
|
||||
// 404: NotFound
|
||||
// 403: ForbiddenError
|
||||
|
||||
// swagger:parameters RouteNotificationsGetTimeInterval
|
||||
type RouteTimeIntervalNameParam struct {
|
||||
// Time interval name
|
||||
// in:path
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// swagger:response GetAllIntervalsResponse
|
||||
type GetAllIntervalsResponse struct {
|
||||
// in:body
|
||||
Body []GettableTimeIntervals
|
||||
}
|
||||
|
||||
// swagger:response GetIntervalsByNameResponse
|
||||
type GetIntervalsByNameResponse struct {
|
||||
// in:body
|
||||
Body GettableTimeIntervals
|
||||
}
|
||||
|
||||
// swagger:model
|
||||
type PostableTimeIntervals struct {
|
||||
Name string `json:"name" hcl:"name"`
|
||||
Version string `json:"version,omitempty"`
|
||||
TimeIntervals []TimeIntervalItem `json:"time_intervals" hcl:"intervals,block"`
|
||||
}
|
||||
|
||||
type TimeIntervalItem struct {
|
||||
Times []TimeIntervalTimeRange `json:"times,omitempty" hcl:"times,block"`
|
||||
Weekdays *[]string `json:"weekdays,omitempty" hcl:"weekdays"`
|
||||
DaysOfMonth *[]string `json:"days_of_month,omitempty" hcl:"days_of_month"`
|
||||
Months *[]string `json:"months,omitempty" hcl:"months"`
|
||||
Years *[]string `json:"years,omitempty" hcl:"years"`
|
||||
Location *string `json:"location,omitempty" hcl:"location"`
|
||||
}
|
||||
|
||||
type TimeIntervalTimeRange struct {
|
||||
StartMinute string `json:"start_time" hcl:"start"`
|
||||
EndMinute string `json:"end_time" hcl:"end"`
|
||||
}
|
||||
|
||||
// swagger:model
|
||||
type GettableTimeIntervals struct {
|
||||
Name string `json:"name" hcl:"name"`
|
||||
TimeIntervals []TimeIntervalItem `json:"time_intervals" hcl:"intervals,block"`
|
||||
Version string `json:"version,omitempty"`
|
||||
Provenance Provenance `json:"provenance,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user