Alerting: Deprecate Alertmanager config and receivers APIs (#98918)

This commit is contained in:
Yuri Tseretyan 2025-01-14 17:22:01 -05:00 committed by GitHub
parent 69da0bb22c
commit e15fc984c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 76 additions and 12 deletions

View File

@ -21,6 +21,9 @@ import (
// //
// sets an Alerting config // sets an Alerting config
// //
// This API is designated to internal use only and can be removed or changed at any time without prior notice.
//
// Deprecated: true
// Responses: // Responses:
// 201: Ack // 201: Ack
// 400: ValidationError // 400: ValidationError
@ -38,6 +41,10 @@ import (
// //
// gets an Alerting config // gets an Alerting config
// //
// This API is designated to internal use only and can be removed or changed at any time without prior notice.
//
// Deprecated: true
//
// Responses: // Responses:
// 200: GettableUserConfig // 200: GettableUserConfig
// 400: ValidationError // 400: ValidationError
@ -55,6 +62,9 @@ import (
// //
// gets Alerting configurations that were successfully applied in the past // gets Alerting configurations that were successfully applied in the past
// //
// This API is designated to internal use only and can be removed or changed at any time without prior notice.
//
// Deprecated: true
// Responses: // Responses:
// 200: GettableHistoricUserConfigs // 200: GettableHistoricUserConfigs
@ -62,6 +72,9 @@ import (
// //
// revert Alerting configuration to the historical configuration specified by the given id // revert Alerting configuration to the historical configuration specified by the given id
// //
// This API is designated to internal use only and can be removed or changed at any time without prior notice.
//
// Deprecated: true
// Responses: // Responses:
// 202: Ack // 202: Ack
// 400: ValidationError // 400: ValidationError
@ -71,6 +84,9 @@ import (
// //
// deletes the Alerting config for a tenant // deletes the Alerting config for a tenant
// //
// This API is designated to internal use only and can be removed or changed at any time without prior notice.
//
// Deprecated: true
// Responses: // Responses:
// 200: Ack // 200: Ack
// 400: ValidationError // 400: ValidationError

View File

@ -4,6 +4,9 @@ package definitions
// //
// Get a receiver by name. // 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: // Responses:
// 200: GetReceiverResponse // 200: GetReceiverResponse
// 403: PermissionDenied // 403: PermissionDenied
@ -13,6 +16,9 @@ package definitions
// //
// Get all receivers. // 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: // Responses:
// 200: GetReceiversResponse // 200: GetReceiversResponse
// 403: PermissionDenied // 403: PermissionDenied

View File

@ -4,6 +4,9 @@ package definitions
// //
// Get all the time intervals // 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: // Responses:
// 200: GetAllIntervalsResponse // 200: GetAllIntervalsResponse
// 403: ForbiddenError // 403: ForbiddenError
@ -12,6 +15,9 @@ package definitions
// //
// Get a time interval by name. // 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: // Responses:
// 200: GetIntervalsByNameResponse // 200: GetIntervalsByNameResponse
// 404: NotFound // 404: NotFound

View File

@ -5471,7 +5471,8 @@
}, },
"/alertmanager/grafana/config/api/v1/alerts": { "/alertmanager/grafana/config/api/v1/alerts": {
"delete": { "delete": {
"description": "deletes the Alerting config for a tenant", "deprecated": true,
"description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"operationId": "RouteDeleteGrafanaAlertingConfig", "operationId": "RouteDeleteGrafanaAlertingConfig",
"responses": { "responses": {
"200": { "200": {
@ -5487,12 +5488,14 @@
} }
} }
}, },
"summary": "deletes the Alerting config for a tenant",
"tags": [ "tags": [
"alertmanager" "alertmanager"
] ]
}, },
"get": { "get": {
"description": "gets an Alerting config", "deprecated": true,
"description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"operationId": "RouteGetGrafanaAlertingConfig", "operationId": "RouteGetGrafanaAlertingConfig",
"responses": { "responses": {
"200": { "200": {
@ -5508,12 +5511,14 @@
} }
} }
}, },
"summary": "gets an Alerting config",
"tags": [ "tags": [
"alertmanager" "alertmanager"
] ]
}, },
"post": { "post": {
"description": "sets an Alerting config", "deprecated": true,
"description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"operationId": "RoutePostGrafanaAlertingConfig", "operationId": "RoutePostGrafanaAlertingConfig",
"parameters": [ "parameters": [
{ {
@ -5538,6 +5543,7 @@
} }
} }
}, },
"summary": "sets an Alerting config",
"tags": [ "tags": [
"alertmanager" "alertmanager"
] ]
@ -5668,7 +5674,8 @@
}, },
"/alertmanager/grafana/config/history": { "/alertmanager/grafana/config/history": {
"get": { "get": {
"description": "gets Alerting configurations that were successfully applied in the past", "deprecated": true,
"description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"operationId": "RouteGetGrafanaAlertingConfigHistory", "operationId": "RouteGetGrafanaAlertingConfigHistory",
"parameters": [ "parameters": [
{ {
@ -5684,6 +5691,7 @@
"$ref": "#/responses/GettableHistoricUserConfigs" "$ref": "#/responses/GettableHistoricUserConfigs"
} }
}, },
"summary": "gets Alerting configurations that were successfully applied in the past",
"tags": [ "tags": [
"alertmanager" "alertmanager"
] ]
@ -5691,7 +5699,8 @@
}, },
"/alertmanager/grafana/config/history/{id}/_activate": { "/alertmanager/grafana/config/history/{id}/_activate": {
"post": { "post": {
"description": "revert Alerting configuration to the historical configuration specified by the given id", "deprecated": true,
"description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"operationId": "RoutePostGrafanaAlertingConfigHistoryActivate", "operationId": "RoutePostGrafanaAlertingConfigHistoryActivate",
"parameters": [ "parameters": [
{ {
@ -5723,6 +5732,7 @@
} }
} }
}, },
"summary": "revert Alerting configuration to the historical configuration specified by the given id",
"tags": [ "tags": [
"alertmanager" "alertmanager"
] ]
@ -7261,6 +7271,8 @@
}, },
"/v1/notifications/receivers": { "/v1/notifications/receivers": {
"get": { "get": {
"deprecated": true,
"description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"operationId": "RouteGetReceivers", "operationId": "RouteGetReceivers",
"parameters": [ "parameters": [
{ {
@ -7308,6 +7320,8 @@
}, },
"/v1/notifications/receivers/{Name}": { "/v1/notifications/receivers/{Name}": {
"get": { "get": {
"deprecated": true,
"description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"operationId": "RouteGetReceiver", "operationId": "RouteGetReceiver",
"parameters": [ "parameters": [
{ {
@ -7347,7 +7361,8 @@
}, },
"/v1/notifications/time-intervals": { "/v1/notifications/time-intervals": {
"get": { "get": {
"description": "Get all the time intervals", "deprecated": true,
"description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"operationId": "RouteNotificationsGetTimeIntervals", "operationId": "RouteNotificationsGetTimeIntervals",
"responses": { "responses": {
"200": { "200": {
@ -7360,6 +7375,7 @@
} }
} }
}, },
"summary": "Get all the time intervals",
"tags": [ "tags": [
"notifications" "notifications"
] ]
@ -7367,6 +7383,8 @@
}, },
"/v1/notifications/time-intervals/{name}": { "/v1/notifications/time-intervals/{name}": {
"get": { "get": {
"deprecated": true,
"description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"operationId": "RouteNotificationsGetTimeInterval", "operationId": "RouteNotificationsGetTimeInterval",
"parameters": [ "parameters": [
{ {

View File

@ -299,11 +299,13 @@
}, },
"/alertmanager/grafana/config/api/v1/alerts": { "/alertmanager/grafana/config/api/v1/alerts": {
"get": { "get": {
"description": "gets an Alerting config", "description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"tags": [ "tags": [
"alertmanager" "alertmanager"
], ],
"summary": "gets an Alerting config",
"operationId": "RouteGetGrafanaAlertingConfig", "operationId": "RouteGetGrafanaAlertingConfig",
"deprecated": true,
"responses": { "responses": {
"200": { "200": {
"description": "GettableUserConfig", "description": "GettableUserConfig",
@ -320,11 +322,13 @@
} }
}, },
"post": { "post": {
"description": "sets an Alerting config", "description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"tags": [ "tags": [
"alertmanager" "alertmanager"
], ],
"summary": "sets an Alerting config",
"operationId": "RoutePostGrafanaAlertingConfig", "operationId": "RoutePostGrafanaAlertingConfig",
"deprecated": true,
"parameters": [ "parameters": [
{ {
"name": "Body", "name": "Body",
@ -350,11 +354,13 @@
} }
}, },
"delete": { "delete": {
"description": "deletes the Alerting config for a tenant", "description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"tags": [ "tags": [
"alertmanager" "alertmanager"
], ],
"summary": "deletes the Alerting config for a tenant",
"operationId": "RouteDeleteGrafanaAlertingConfig", "operationId": "RouteDeleteGrafanaAlertingConfig",
"deprecated": true,
"responses": { "responses": {
"200": { "200": {
"description": "Ack", "description": "Ack",
@ -496,11 +502,13 @@
}, },
"/alertmanager/grafana/config/history": { "/alertmanager/grafana/config/history": {
"get": { "get": {
"description": "gets Alerting configurations that were successfully applied in the past", "description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"tags": [ "tags": [
"alertmanager" "alertmanager"
], ],
"summary": "gets Alerting configurations that were successfully applied in the past",
"operationId": "RouteGetGrafanaAlertingConfigHistory", "operationId": "RouteGetGrafanaAlertingConfigHistory",
"deprecated": true,
"parameters": [ "parameters": [
{ {
"type": "integer", "type": "integer",
@ -519,11 +527,13 @@
}, },
"/alertmanager/grafana/config/history/{id}/_activate": { "/alertmanager/grafana/config/history/{id}/_activate": {
"post": { "post": {
"description": "revert Alerting configuration to the historical configuration specified by the given id", "description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"tags": [ "tags": [
"alertmanager" "alertmanager"
], ],
"summary": "revert Alerting configuration to the historical configuration specified by the given id",
"operationId": "RoutePostGrafanaAlertingConfigHistoryActivate", "operationId": "RoutePostGrafanaAlertingConfigHistoryActivate",
"deprecated": true,
"parameters": [ "parameters": [
{ {
"type": "integer", "type": "integer",
@ -2089,11 +2099,13 @@
}, },
"/v1/notifications/receivers": { "/v1/notifications/receivers": {
"get": { "get": {
"description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"tags": [ "tags": [
"notifications" "notifications"
], ],
"summary": "Get all receivers.", "summary": "Get all receivers.",
"operationId": "RouteGetReceivers", "operationId": "RouteGetReceivers",
"deprecated": true,
"parameters": [ "parameters": [
{ {
"type": "array", "type": "array",
@ -2136,11 +2148,13 @@
}, },
"/v1/notifications/receivers/{Name}": { "/v1/notifications/receivers/{Name}": {
"get": { "get": {
"description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"tags": [ "tags": [
"notifications" "notifications"
], ],
"summary": "Get a receiver by name.", "summary": "Get a receiver by name.",
"operationId": "RouteGetReceiver", "operationId": "RouteGetReceiver",
"deprecated": true,
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",
@ -2175,11 +2189,13 @@
}, },
"/v1/notifications/time-intervals": { "/v1/notifications/time-intervals": {
"get": { "get": {
"description": "Get all the time intervals", "description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"tags": [ "tags": [
"notifications" "notifications"
], ],
"summary": "Get all the time intervals",
"operationId": "RouteNotificationsGetTimeIntervals", "operationId": "RouteNotificationsGetTimeIntervals",
"deprecated": true,
"responses": { "responses": {
"200": { "200": {
"$ref": "#/responses/GetAllIntervalsResponse" "$ref": "#/responses/GetAllIntervalsResponse"
@ -2195,11 +2211,13 @@
}, },
"/v1/notifications/time-intervals/{name}": { "/v1/notifications/time-intervals/{name}": {
"get": { "get": {
"description": "This API is designated to internal use only and can be removed or changed at any time without prior notice.",
"tags": [ "tags": [
"notifications" "notifications"
], ],
"summary": "Get a time interval by name.", "summary": "Get a time interval by name.",
"operationId": "RouteNotificationsGetTimeInterval", "operationId": "RouteNotificationsGetTimeInterval",
"deprecated": true,
"parameters": [ "parameters": [
{ {
"type": "string", "type": "string",