ngalert openapi: Use same basePath as rest of Grafana (#79025)
* ngalert openapi: Use same `basePath` as rest of Grafana Currently, there are two issues that prevent easily merging `ngalert` and grafana openapi specs: - The basePath is different. `grafana` has `/api` and `ngalert` has `/api/v1`. I changed `ngalert` to use `/api` - The `ngalert` endpoints have their basePath in the each operation path. The basePath should actually be omitted --------- Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
This commit is contained in:
co-authored by
Yuriy Tseretyan
parent
dce9d1e87c
commit
c9211fbd69
@@ -4,7 +4,7 @@ import (
|
||||
v1 "github.com/prometheus/client_golang/api/prometheus/v1"
|
||||
)
|
||||
|
||||
// swagger:route GET /api/v1/ngalert configuration RouteGetStatus
|
||||
// swagger:route GET /v1/ngalert configuration RouteGetStatus
|
||||
//
|
||||
// Get the status of the alerting engine
|
||||
//
|
||||
@@ -14,7 +14,7 @@ import (
|
||||
// Responses:
|
||||
// 200: AlertingStatus
|
||||
|
||||
// swagger:route GET /api/v1/ngalert/alertmanagers configuration RouteGetAlertmanagers
|
||||
// swagger:route GET /v1/ngalert/alertmanagers configuration RouteGetAlertmanagers
|
||||
//
|
||||
// Get the discovered and dropped Alertmanagers of the user's organization based on the specified configuration.
|
||||
//
|
||||
@@ -24,7 +24,7 @@ import (
|
||||
// Responses:
|
||||
// 200: GettableAlertmanagers
|
||||
|
||||
// swagger:route GET /api/v1/ngalert/admin_config configuration RouteGetNGalertConfig
|
||||
// swagger:route GET /v1/ngalert/admin_config configuration RouteGetNGalertConfig
|
||||
//
|
||||
// Get the NGalert configuration of the user's organization, returns 404 if no configuration is present.
|
||||
//
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// 404: Failure
|
||||
// 500: Failure
|
||||
|
||||
// swagger:route POST /api/v1/ngalert/admin_config configuration RoutePostNGalertConfig
|
||||
// swagger:route POST /v1/ngalert/admin_config configuration RoutePostNGalertConfig
|
||||
//
|
||||
// Creates or updates the NGalert configuration of the user's organization. If no value is sent for alertmanagersChoice, it defaults to "all".
|
||||
//
|
||||
@@ -47,7 +47,7 @@ import (
|
||||
// 201: Ack
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route DELETE /api/v1/ngalert/admin_config configuration RouteDeleteNGalertConfig
|
||||
// swagger:route DELETE /v1/ngalert/admin_config configuration RouteDeleteNGalertConfig
|
||||
//
|
||||
// Deletes the NGalert configuration of the user's organization.
|
||||
//
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
// swagger:route POST /api/alertmanager/grafana/config/api/v1/alerts alertmanager RoutePostGrafanaAlertingConfig
|
||||
// swagger:route POST /alertmanager/grafana/config/api/v1/alerts alertmanager RoutePostGrafanaAlertingConfig
|
||||
//
|
||||
// sets an Alerting config
|
||||
//
|
||||
@@ -25,7 +25,7 @@ import (
|
||||
// 201: Ack
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route POST /api/alertmanager/{DatasourceUID}/config/api/v1/alerts alertmanager RoutePostAlertingConfig
|
||||
// swagger:route POST /alertmanager/{DatasourceUID}/config/api/v1/alerts alertmanager RoutePostAlertingConfig
|
||||
//
|
||||
// sets an Alerting config
|
||||
//
|
||||
@@ -34,7 +34,7 @@ import (
|
||||
// 400: ValidationError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route GET /api/alertmanager/grafana/config/api/v1/alerts alertmanager RouteGetGrafanaAlertingConfig
|
||||
// swagger:route GET /alertmanager/grafana/config/api/v1/alerts alertmanager RouteGetGrafanaAlertingConfig
|
||||
//
|
||||
// gets an Alerting config
|
||||
//
|
||||
@@ -42,7 +42,7 @@ import (
|
||||
// 200: GettableUserConfig
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route GET /api/alertmanager/{DatasourceUID}/config/api/v1/alerts alertmanager RouteGetAlertingConfig
|
||||
// swagger:route GET /alertmanager/{DatasourceUID}/config/api/v1/alerts alertmanager RouteGetAlertingConfig
|
||||
//
|
||||
// gets an Alerting config
|
||||
//
|
||||
@@ -51,14 +51,14 @@ import (
|
||||
// 400: ValidationError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route GET /api/alertmanager/grafana/config/history alertmanager RouteGetGrafanaAlertingConfigHistory
|
||||
// swagger:route GET /alertmanager/grafana/config/history alertmanager RouteGetGrafanaAlertingConfigHistory
|
||||
//
|
||||
// gets Alerting configurations that were successfully applied in the past
|
||||
//
|
||||
// Responses:
|
||||
// 200: GettableHistoricUserConfigs
|
||||
|
||||
// swagger:route POST /api/alertmanager/grafana/config/history/{id}/_activate alertmanager RoutePostGrafanaAlertingConfigHistoryActivate
|
||||
// swagger:route POST /alertmanager/grafana/config/history/{id}/_activate alertmanager RoutePostGrafanaAlertingConfigHistoryActivate
|
||||
//
|
||||
// revert Alerting configuration to the historical configuration specified by the given id
|
||||
//
|
||||
@@ -67,7 +67,7 @@ import (
|
||||
// 400: ValidationError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route DELETE /api/alertmanager/grafana/config/api/v1/alerts alertmanager RouteDeleteGrafanaAlertingConfig
|
||||
// swagger:route DELETE /alertmanager/grafana/config/api/v1/alerts alertmanager RouteDeleteGrafanaAlertingConfig
|
||||
//
|
||||
// deletes the Alerting config for a tenant
|
||||
//
|
||||
@@ -75,7 +75,7 @@ import (
|
||||
// 200: Ack
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route DELETE /api/alertmanager/{DatasourceUID}/config/api/v1/alerts alertmanager RouteDeleteAlertingConfig
|
||||
// swagger:route DELETE /alertmanager/{DatasourceUID}/config/api/v1/alerts alertmanager RouteDeleteAlertingConfig
|
||||
//
|
||||
// deletes the Alerting config for a tenant
|
||||
//
|
||||
@@ -84,7 +84,7 @@ import (
|
||||
// 400: ValidationError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route GET /api/alertmanager/grafana/api/v2/status alertmanager RouteGetGrafanaAMStatus
|
||||
// swagger:route GET /alertmanager/grafana/api/v2/status alertmanager RouteGetGrafanaAMStatus
|
||||
//
|
||||
// get alertmanager status and configuration
|
||||
//
|
||||
@@ -92,7 +92,7 @@ import (
|
||||
// 200: GettableStatus
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route GET /api/alertmanager/{DatasourceUID}/api/v2/status alertmanager RouteGetAMStatus
|
||||
// swagger:route GET /alertmanager/{DatasourceUID}/api/v2/status alertmanager RouteGetAMStatus
|
||||
//
|
||||
// get alertmanager status and configuration
|
||||
//
|
||||
@@ -101,7 +101,7 @@ import (
|
||||
// 400: ValidationError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route GET /api/alertmanager/grafana/api/v2/alerts alertmanager RouteGetGrafanaAMAlerts
|
||||
// swagger:route GET /alertmanager/grafana/api/v2/alerts alertmanager RouteGetGrafanaAMAlerts
|
||||
//
|
||||
// get alertmanager alerts
|
||||
//
|
||||
@@ -109,7 +109,7 @@ import (
|
||||
// 200: gettableAlerts
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route GET /api/alertmanager/{DatasourceUID}/api/v2/alerts alertmanager RouteGetAMAlerts
|
||||
// swagger:route GET /alertmanager/{DatasourceUID}/api/v2/alerts alertmanager RouteGetAMAlerts
|
||||
//
|
||||
// get alertmanager alerts
|
||||
//
|
||||
@@ -118,7 +118,7 @@ import (
|
||||
// 400: ValidationError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route POST /api/alertmanager/{DatasourceUID}/api/v2/alerts alertmanager RoutePostAMAlerts
|
||||
// swagger:route POST /alertmanager/{DatasourceUID}/api/v2/alerts alertmanager RoutePostAMAlerts
|
||||
//
|
||||
// create alertmanager alerts
|
||||
//
|
||||
@@ -127,7 +127,7 @@ import (
|
||||
// 400: ValidationError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route GET /api/alertmanager/grafana/api/v2/alerts/groups alertmanager RouteGetGrafanaAMAlertGroups
|
||||
// swagger:route GET /alertmanager/grafana/api/v2/alerts/groups alertmanager RouteGetGrafanaAMAlertGroups
|
||||
//
|
||||
// get alertmanager alerts
|
||||
//
|
||||
@@ -135,7 +135,7 @@ import (
|
||||
// 200: alertGroups
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route GET /api/alertmanager/{DatasourceUID}/api/v2/alerts/groups alertmanager RouteGetAMAlertGroups
|
||||
// swagger:route GET /alertmanager/{DatasourceUID}/api/v2/alerts/groups alertmanager RouteGetAMAlertGroups
|
||||
//
|
||||
// get alertmanager alerts
|
||||
//
|
||||
@@ -144,14 +144,14 @@ import (
|
||||
// 400: ValidationError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route GET /api/alertmanager/grafana/config/api/v1/receivers alertmanager RouteGetGrafanaReceivers
|
||||
// swagger:route GET /alertmanager/grafana/config/api/v1/receivers alertmanager RouteGetGrafanaReceivers
|
||||
//
|
||||
// Get a list of all receivers
|
||||
//
|
||||
// Responses:
|
||||
// 200: receiversResponse
|
||||
|
||||
// swagger:route POST /api/alertmanager/grafana/config/api/v1/receivers/test alertmanager RoutePostTestGrafanaReceivers
|
||||
// swagger:route POST /alertmanager/grafana/config/api/v1/receivers/test alertmanager RoutePostTestGrafanaReceivers
|
||||
//
|
||||
// Test Grafana managed receivers without saving them.
|
||||
//
|
||||
@@ -165,7 +165,7 @@ import (
|
||||
// 408: Failure
|
||||
// 409: AlertManagerNotReady
|
||||
|
||||
// swagger:route POST /api/alertmanager/grafana/config/api/v1/templates/test alertmanager RoutePostTestGrafanaTemplates
|
||||
// swagger:route POST /alertmanager/grafana/config/api/v1/templates/test alertmanager RoutePostTestGrafanaTemplates
|
||||
//
|
||||
// Test Grafana managed templates without saving them.
|
||||
// Produces:
|
||||
@@ -178,7 +178,7 @@ import (
|
||||
// 403: PermissionDenied
|
||||
// 409: AlertManagerNotReady
|
||||
|
||||
// swagger:route GET /api/alertmanager/grafana/api/v2/silences alertmanager RouteGetGrafanaSilences
|
||||
// swagger:route GET /alertmanager/grafana/api/v2/silences alertmanager RouteGetGrafanaSilences
|
||||
//
|
||||
// get silences
|
||||
//
|
||||
@@ -186,7 +186,7 @@ import (
|
||||
// 200: gettableSilences
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route GET /api/alertmanager/{DatasourceUID}/api/v2/silences alertmanager RouteGetSilences
|
||||
// swagger:route GET /alertmanager/{DatasourceUID}/api/v2/silences alertmanager RouteGetSilences
|
||||
//
|
||||
// get silences
|
||||
//
|
||||
@@ -195,7 +195,7 @@ import (
|
||||
// 400: ValidationError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route POST /api/alertmanager/grafana/api/v2/silences alertmanager RouteCreateGrafanaSilence
|
||||
// swagger:route POST /alertmanager/grafana/api/v2/silences alertmanager RouteCreateGrafanaSilence
|
||||
//
|
||||
// create silence
|
||||
//
|
||||
@@ -203,7 +203,7 @@ import (
|
||||
// 202: postSilencesOKBody
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route POST /api/alertmanager/{DatasourceUID}/api/v2/silences alertmanager RouteCreateSilence
|
||||
// swagger:route POST /alertmanager/{DatasourceUID}/api/v2/silences alertmanager RouteCreateSilence
|
||||
//
|
||||
// create silence
|
||||
//
|
||||
@@ -212,7 +212,7 @@ import (
|
||||
// 400: ValidationError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route GET /api/alertmanager/grafana/api/v2/silence/{SilenceId} alertmanager RouteGetGrafanaSilence
|
||||
// swagger:route GET /alertmanager/grafana/api/v2/silence/{SilenceId} alertmanager RouteGetGrafanaSilence
|
||||
//
|
||||
// get silence
|
||||
//
|
||||
@@ -220,7 +220,7 @@ import (
|
||||
// 200: gettableSilence
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route GET /api/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId} alertmanager RouteGetSilence
|
||||
// swagger:route GET /alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId} alertmanager RouteGetSilence
|
||||
//
|
||||
// get silence
|
||||
//
|
||||
@@ -229,7 +229,7 @@ import (
|
||||
// 400: ValidationError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route DELETE /api/alertmanager/grafana/api/v2/silence/{SilenceId} alertmanager RouteDeleteGrafanaSilence
|
||||
// swagger:route DELETE /alertmanager/grafana/api/v2/silence/{SilenceId} alertmanager RouteDeleteGrafanaSilence
|
||||
//
|
||||
// delete silence
|
||||
//
|
||||
@@ -237,7 +237,7 @@ import (
|
||||
// 200: Ack
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route DELETE /api/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId} alertmanager RouteDeleteSilence
|
||||
// swagger:route DELETE /alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId} alertmanager RouteDeleteSilence
|
||||
//
|
||||
// delete silence
|
||||
//
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// spec for the Grafana Alerting API.
|
||||
//
|
||||
// Schemes: http, https
|
||||
// BasePath: /api/v1
|
||||
// BasePath: /api
|
||||
// Version: 1.1.0
|
||||
//
|
||||
// Consumes:
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/prometheus/common/model"
|
||||
)
|
||||
|
||||
// swagger:route Get /api/ruler/grafana/api/v1/rules ruler RouteGetGrafanaRulesConfig
|
||||
// swagger:route Get /ruler/grafana/api/v1/rules ruler RouteGetGrafanaRulesConfig
|
||||
//
|
||||
// List rule groups
|
||||
//
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
// 403: ForbiddenError
|
||||
//
|
||||
|
||||
// swagger:route Get /api/ruler/grafana/api/v1/export/rules ruler RouteGetRulesForExport
|
||||
// swagger:route Get /ruler/grafana/api/v1/export/rules ruler RouteGetRulesForExport
|
||||
//
|
||||
// List rules in provisioning format
|
||||
//
|
||||
@@ -33,7 +33,7 @@ import (
|
||||
// 403: ForbiddenError
|
||||
// 404: description: Not found.
|
||||
|
||||
// swagger:route Get /api/ruler/{DatasourceUID}/api/v1/rules ruler RouteGetRulesConfig
|
||||
// swagger:route Get /ruler/{DatasourceUID}/api/v1/rules ruler RouteGetRulesConfig
|
||||
//
|
||||
// List rule groups
|
||||
//
|
||||
@@ -45,7 +45,7 @@ import (
|
||||
// 403: ForbiddenError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route POST /api/ruler/grafana/api/v1/rules/{Namespace} ruler RoutePostNameGrafanaRulesConfig
|
||||
// swagger:route POST /ruler/grafana/api/v1/rules/{Namespace} ruler RoutePostNameGrafanaRulesConfig
|
||||
//
|
||||
// Creates or updates a rule group
|
||||
//
|
||||
@@ -58,7 +58,7 @@ import (
|
||||
// 403: ForbiddenError
|
||||
//
|
||||
|
||||
// swagger:route POST /api/ruler/grafana/api/v1/rules/{Namespace}/export ruler RoutePostRulesGroupForExport
|
||||
// swagger:route POST /ruler/grafana/api/v1/rules/{Namespace}/export ruler RoutePostRulesGroupForExport
|
||||
//
|
||||
// Converts submitted rule group to provisioning format
|
||||
//
|
||||
@@ -71,7 +71,7 @@ import (
|
||||
// 403: ForbiddenError
|
||||
// 404: description: Not found.
|
||||
|
||||
// swagger:route POST /api/ruler/{DatasourceUID}/api/v1/rules/{Namespace} ruler RoutePostNameRulesConfig
|
||||
// swagger:route POST /ruler/{DatasourceUID}/api/v1/rules/{Namespace} ruler RoutePostNameRulesConfig
|
||||
//
|
||||
// Creates or updates a rule group
|
||||
//
|
||||
@@ -84,7 +84,7 @@ import (
|
||||
// 403: ForbiddenError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route Get /api/ruler/grafana/api/v1/rules/{Namespace} ruler RouteGetNamespaceGrafanaRulesConfig
|
||||
// swagger:route Get /ruler/grafana/api/v1/rules/{Namespace} ruler RouteGetNamespaceGrafanaRulesConfig
|
||||
//
|
||||
// Get rule groups by namespace
|
||||
//
|
||||
@@ -95,7 +95,7 @@ import (
|
||||
// 403: ForbiddenError
|
||||
// 202: NamespaceConfigResponse
|
||||
|
||||
// swagger:route Get /api/ruler/{DatasourceUID}/api/v1/rules/{Namespace} ruler RouteGetNamespaceRulesConfig
|
||||
// swagger:route Get /ruler/{DatasourceUID}/api/v1/rules/{Namespace} ruler RouteGetNamespaceRulesConfig
|
||||
//
|
||||
// Get rule groups by namespace
|
||||
//
|
||||
@@ -107,7 +107,7 @@ import (
|
||||
// 403: ForbiddenError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route Delete /api/ruler/grafana/api/v1/rules/{Namespace} ruler RouteDeleteNamespaceGrafanaRulesConfig
|
||||
// swagger:route Delete /ruler/grafana/api/v1/rules/{Namespace} ruler RouteDeleteNamespaceGrafanaRulesConfig
|
||||
//
|
||||
// Delete namespace
|
||||
//
|
||||
@@ -115,7 +115,7 @@ import (
|
||||
// 202: Ack
|
||||
// 403: ForbiddenError
|
||||
|
||||
// swagger:route Delete /api/ruler/{DatasourceUID}/api/v1/rules/{Namespace} ruler RouteDeleteNamespaceRulesConfig
|
||||
// swagger:route Delete /ruler/{DatasourceUID}/api/v1/rules/{Namespace} ruler RouteDeleteNamespaceRulesConfig
|
||||
//
|
||||
// Delete namespace
|
||||
//
|
||||
@@ -124,7 +124,7 @@ import (
|
||||
// 403: ForbiddenError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route Get /api/ruler/grafana/api/v1/rules/{Namespace}/{Groupname} ruler RouteGetGrafanaRuleGroupConfig
|
||||
// swagger:route Get /ruler/grafana/api/v1/rules/{Namespace}/{Groupname} ruler RouteGetGrafanaRuleGroupConfig
|
||||
//
|
||||
// Get rule group
|
||||
//
|
||||
@@ -135,7 +135,7 @@ import (
|
||||
// 202: RuleGroupConfigResponse
|
||||
// 403: ForbiddenError
|
||||
|
||||
// swagger:route Get /api/ruler/{DatasourceUID}/api/v1/rules/{Namespace}/{Groupname} ruler RouteGetRulegGroupConfig
|
||||
// swagger:route Get /ruler/{DatasourceUID}/api/v1/rules/{Namespace}/{Groupname} ruler RouteGetRulegGroupConfig
|
||||
//
|
||||
// Get rule group
|
||||
//
|
||||
@@ -147,7 +147,7 @@ import (
|
||||
// 403: ForbiddenError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route Delete /api/ruler/grafana/api/v1/rules/{Namespace}/{Groupname} ruler RouteDeleteGrafanaRuleGroupConfig
|
||||
// swagger:route Delete /ruler/grafana/api/v1/rules/{Namespace}/{Groupname} ruler RouteDeleteGrafanaRuleGroupConfig
|
||||
//
|
||||
// Delete rule group
|
||||
//
|
||||
@@ -155,7 +155,7 @@ import (
|
||||
// 202: Ack
|
||||
// 403: ForbiddenError
|
||||
|
||||
// swagger:route Delete /api/ruler/{DatasourceUID}/api/v1/rules/{Namespace}/{Groupname} ruler RouteDeleteRuleGroupConfig
|
||||
// swagger:route Delete /ruler/{DatasourceUID}/api/v1/rules/{Namespace}/{Groupname} ruler RouteDeleteRuleGroupConfig
|
||||
//
|
||||
// Delete rule group
|
||||
//
|
||||
|
||||
@@ -9,14 +9,14 @@ import (
|
||||
v1 "github.com/prometheus/client_golang/api/prometheus/v1"
|
||||
)
|
||||
|
||||
// swagger:route GET /api/prometheus/grafana/api/v1/rules prometheus RouteGetGrafanaRuleStatuses
|
||||
// swagger:route GET /prometheus/grafana/api/v1/rules prometheus RouteGetGrafanaRuleStatuses
|
||||
//
|
||||
// gets the evaluation statuses of all rules
|
||||
//
|
||||
// Responses:
|
||||
// 200: RuleResponse
|
||||
|
||||
// swagger:route GET /api/prometheus/{DatasourceUID}/api/v1/rules prometheus RouteGetRuleStatuses
|
||||
// swagger:route GET /prometheus/{DatasourceUID}/api/v1/rules prometheus RouteGetRuleStatuses
|
||||
//
|
||||
// gets the evaluation statuses of all rules
|
||||
//
|
||||
@@ -24,14 +24,14 @@ import (
|
||||
// 200: RuleResponse
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route GET /api/prometheus/grafana/api/v1/alerts prometheus RouteGetGrafanaAlertStatuses
|
||||
// swagger:route GET /prometheus/grafana/api/v1/alerts prometheus RouteGetGrafanaAlertStatuses
|
||||
//
|
||||
// gets the current alerts
|
||||
//
|
||||
// Responses:
|
||||
// 200: AlertResponse
|
||||
|
||||
// swagger:route GET /api/prometheus/{DatasourceUID}/api/v1/alerts prometheus RouteGetAlertStatuses
|
||||
// swagger:route GET /prometheus/{DatasourceUID}/api/v1/alerts prometheus RouteGetAlertStatuses
|
||||
//
|
||||
// gets the current alerts
|
||||
//
|
||||
|
||||
@@ -6,14 +6,14 @@ import (
|
||||
"github.com/prometheus/common/model"
|
||||
)
|
||||
|
||||
// swagger:route GET /api/v1/provisioning/alert-rules provisioning stable RouteGetAlertRules
|
||||
// swagger:route GET /v1/provisioning/alert-rules provisioning stable RouteGetAlertRules
|
||||
//
|
||||
// Get all the alert rules.
|
||||
//
|
||||
// Responses:
|
||||
// 200: ProvisionedAlertRules
|
||||
|
||||
// swagger:route GET /api/v1/provisioning/alert-rules/export provisioning stable RouteGetAlertRulesExport
|
||||
// swagger:route GET /v1/provisioning/alert-rules/export provisioning stable RouteGetAlertRulesExport
|
||||
//
|
||||
// Export all alert rules in provisioning file format.
|
||||
//
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
// 200: AlertingFileExport
|
||||
// 404: description: Not found.
|
||||
|
||||
// swagger:route GET /api/v1/provisioning/alert-rules/{UID} provisioning stable RouteGetAlertRule
|
||||
// swagger:route GET /v1/provisioning/alert-rules/{UID} provisioning stable RouteGetAlertRule
|
||||
//
|
||||
// Get a specific alert rule by UID.
|
||||
//
|
||||
@@ -29,7 +29,7 @@ import (
|
||||
// 200: ProvisionedAlertRule
|
||||
// 404: description: Not found.
|
||||
|
||||
// swagger:route GET /api/v1/provisioning/alert-rules/{UID}/export provisioning stable RouteGetAlertRuleExport
|
||||
// swagger:route GET /v1/provisioning/alert-rules/{UID}/export provisioning stable RouteGetAlertRuleExport
|
||||
//
|
||||
// Export an alert rule in provisioning file format.
|
||||
//
|
||||
@@ -42,7 +42,7 @@ import (
|
||||
// 200: AlertingFileExport
|
||||
// 404: description: Not found.
|
||||
|
||||
// swagger:route POST /api/v1/provisioning/alert-rules provisioning stable RoutePostAlertRule
|
||||
// swagger:route POST /v1/provisioning/alert-rules provisioning stable RoutePostAlertRule
|
||||
//
|
||||
// Create a new alert rule.
|
||||
//
|
||||
@@ -53,7 +53,7 @@ import (
|
||||
// 201: ProvisionedAlertRule
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route PUT /api/v1/provisioning/alert-rules/{UID} provisioning stable RoutePutAlertRule
|
||||
// swagger:route PUT /v1/provisioning/alert-rules/{UID} provisioning stable RoutePutAlertRule
|
||||
//
|
||||
// Update an existing alert rule.
|
||||
//
|
||||
@@ -64,7 +64,7 @@ import (
|
||||
// 200: ProvisionedAlertRule
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route DELETE /api/v1/provisioning/alert-rules/{UID} provisioning stable RouteDeleteAlertRule
|
||||
// swagger:route DELETE /v1/provisioning/alert-rules/{UID} provisioning stable RouteDeleteAlertRule
|
||||
//
|
||||
// Delete a specific alert rule by UID.
|
||||
//
|
||||
@@ -158,7 +158,7 @@ type ProvisionedAlertRule struct {
|
||||
IsPaused bool `json:"isPaused"`
|
||||
}
|
||||
|
||||
// swagger:route GET /api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group} provisioning stable RouteGetAlertRuleGroup
|
||||
// swagger:route GET /v1/provisioning/folder/{FolderUID}/rule-groups/{Group} provisioning stable RouteGetAlertRuleGroup
|
||||
//
|
||||
// Get a rule group.
|
||||
//
|
||||
@@ -166,7 +166,7 @@ type ProvisionedAlertRule struct {
|
||||
// 200: AlertRuleGroup
|
||||
// 404: description: Not found.
|
||||
|
||||
// swagger:route GET /api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}/export provisioning stable RouteGetAlertRuleGroupExport
|
||||
// swagger:route GET /v1/provisioning/folder/{FolderUID}/rule-groups/{Group}/export provisioning stable RouteGetAlertRuleGroupExport
|
||||
//
|
||||
// Export an alert rule group in provisioning file format.
|
||||
//
|
||||
@@ -179,7 +179,7 @@ type ProvisionedAlertRule struct {
|
||||
// 200: AlertingFileExport
|
||||
// 404: description: Not found.
|
||||
|
||||
// swagger:route PUT /api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group} provisioning stable RoutePutAlertRuleGroup
|
||||
// swagger:route PUT /v1/provisioning/folder/{FolderUID}/rule-groups/{Group} provisioning stable RoutePutAlertRuleGroup
|
||||
//
|
||||
// Update the interval of a rule group.
|
||||
//
|
||||
|
||||
@@ -4,14 +4,14 @@ import (
|
||||
"github.com/grafana/grafana/pkg/components/simplejson"
|
||||
)
|
||||
|
||||
// swagger:route GET /api/v1/provisioning/contact-points provisioning stable RouteGetContactpoints
|
||||
// swagger:route GET /v1/provisioning/contact-points provisioning stable RouteGetContactpoints
|
||||
//
|
||||
// Get all the contact points.
|
||||
//
|
||||
// Responses:
|
||||
// 200: ContactPoints
|
||||
|
||||
// swagger:route GET /api/v1/provisioning/contact-points/export provisioning stable RouteGetContactpointsExport
|
||||
// swagger:route GET /v1/provisioning/contact-points/export provisioning stable RouteGetContactpointsExport
|
||||
//
|
||||
// Export all contact points in provisioning file format.
|
||||
//
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
// 200: AlertingFileExport
|
||||
// 403: PermissionDenied
|
||||
|
||||
// swagger:route POST /api/v1/provisioning/contact-points provisioning stable RoutePostContactpoints
|
||||
// swagger:route POST /v1/provisioning/contact-points provisioning stable RoutePostContactpoints
|
||||
//
|
||||
// Create a contact point.
|
||||
//
|
||||
@@ -30,7 +30,7 @@ import (
|
||||
// 202: EmbeddedContactPoint
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route PUT /api/v1/provisioning/contact-points/{UID} provisioning stable RoutePutContactpoint
|
||||
// swagger:route PUT /v1/provisioning/contact-points/{UID} provisioning stable RoutePutContactpoint
|
||||
//
|
||||
// Update an existing contact point.
|
||||
//
|
||||
@@ -41,7 +41,7 @@ import (
|
||||
// 202: Ack
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route DELETE /api/v1/provisioning/contact-points/{UID} provisioning stable RouteDeleteContactpoints
|
||||
// swagger:route DELETE /v1/provisioning/contact-points/{UID} provisioning stable RouteDeleteContactpoints
|
||||
//
|
||||
// Delete a contact point.
|
||||
//
|
||||
|
||||
@@ -4,14 +4,14 @@ import (
|
||||
"github.com/prometheus/alertmanager/config"
|
||||
)
|
||||
|
||||
// swagger:route GET /api/v1/provisioning/mute-timings provisioning stable RouteGetMuteTimings
|
||||
// swagger:route GET /v1/provisioning/mute-timings provisioning stable RouteGetMuteTimings
|
||||
//
|
||||
// Get all the mute timings.
|
||||
//
|
||||
// Responses:
|
||||
// 200: MuteTimings
|
||||
|
||||
// swagger:route GET /api/v1/provisioning/mute-timings/export provisioning stable RouteExportMuteTimings
|
||||
// swagger:route GET /v1/provisioning/mute-timings/export provisioning stable RouteExportMuteTimings
|
||||
//
|
||||
// Export all mute timings in provisioning format.
|
||||
//
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
// 200: AlertingFileExport
|
||||
// 403: PermissionDenied
|
||||
|
||||
// swagger:route GET /api/v1/provisioning/mute-timings/{name} provisioning stable RouteGetMuteTiming
|
||||
// swagger:route GET /v1/provisioning/mute-timings/{name} provisioning stable RouteGetMuteTiming
|
||||
//
|
||||
// Get a mute timing.
|
||||
//
|
||||
@@ -27,7 +27,7 @@ import (
|
||||
// 200: MuteTimeInterval
|
||||
// 404: description: Not found.
|
||||
|
||||
// swagger:route GET /api/v1/provisioning/mute-timings/{name}/export provisioning stable RouteExportMuteTiming
|
||||
// swagger:route GET /v1/provisioning/mute-timings/{name}/export provisioning stable RouteExportMuteTiming
|
||||
//
|
||||
// Export a mute timing in provisioning format.
|
||||
//
|
||||
@@ -35,7 +35,7 @@ import (
|
||||
// 200: AlertingFileExport
|
||||
// 403: PermissionDenied
|
||||
|
||||
// swagger:route POST /api/v1/provisioning/mute-timings provisioning stable RoutePostMuteTiming
|
||||
// swagger:route POST /v1/provisioning/mute-timings provisioning stable RoutePostMuteTiming
|
||||
//
|
||||
// Create a new mute timing.
|
||||
//
|
||||
@@ -46,7 +46,7 @@ import (
|
||||
// 201: MuteTimeInterval
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route PUT /api/v1/provisioning/mute-timings/{name} provisioning stable RoutePutMuteTiming
|
||||
// swagger:route PUT /v1/provisioning/mute-timings/{name} provisioning stable RoutePutMuteTiming
|
||||
//
|
||||
// Replace an existing mute timing.
|
||||
//
|
||||
@@ -57,7 +57,7 @@ import (
|
||||
// 202: MuteTimeInterval
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route DELETE /api/v1/provisioning/mute-timings/{name} provisioning stable RouteDeleteMuteTiming
|
||||
// swagger:route DELETE /v1/provisioning/mute-timings/{name} provisioning stable RouteDeleteMuteTiming
|
||||
//
|
||||
// Delete a mute timing.
|
||||
//
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"github.com/prometheus/alertmanager/config"
|
||||
)
|
||||
|
||||
// swagger:route GET /api/v1/provisioning/policies provisioning stable RouteGetPolicyTree
|
||||
// swagger:route GET /v1/provisioning/policies provisioning stable RouteGetPolicyTree
|
||||
//
|
||||
// Get the notification policy tree.
|
||||
//
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
// 200: Route
|
||||
// description: The currently active notification routing tree
|
||||
|
||||
// swagger:route PUT /api/v1/provisioning/policies provisioning stable RoutePutPolicyTree
|
||||
// swagger:route PUT /v1/provisioning/policies provisioning stable RoutePutPolicyTree
|
||||
//
|
||||
// Sets the notification policy tree.
|
||||
//
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
// 202: Ack
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route DELETE /api/v1/provisioning/policies provisioning stable RouteResetPolicyTree
|
||||
// swagger:route DELETE /v1/provisioning/policies provisioning stable RouteResetPolicyTree
|
||||
//
|
||||
// Clears the notification policy tree.
|
||||
//
|
||||
@@ -33,7 +33,7 @@ import (
|
||||
// Responses:
|
||||
// 202: Ack
|
||||
|
||||
// swagger:route GET /api/v1/provisioning/policies/export provisioning stable RouteGetPolicyTreeExport
|
||||
// swagger:route GET /v1/provisioning/policies/export provisioning stable RouteGetPolicyTreeExport
|
||||
//
|
||||
// Export the notification policy tree in provisioning file format.
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package definitions
|
||||
|
||||
// swagger:route GET /api/v1/provisioning/templates provisioning stable RouteGetTemplates
|
||||
// swagger:route GET /v1/provisioning/templates provisioning stable RouteGetTemplates
|
||||
//
|
||||
// Get all notification templates.
|
||||
//
|
||||
@@ -8,7 +8,7 @@ package definitions
|
||||
// 200: NotificationTemplates
|
||||
// 404: description: Not found.
|
||||
|
||||
// swagger:route GET /api/v1/provisioning/templates/{name} provisioning stable RouteGetTemplate
|
||||
// swagger:route GET /v1/provisioning/templates/{name} provisioning stable RouteGetTemplate
|
||||
//
|
||||
// Get a notification template.
|
||||
//
|
||||
@@ -16,7 +16,7 @@ package definitions
|
||||
// 200: NotificationTemplate
|
||||
// 404: description: Not found.
|
||||
|
||||
// swagger:route PUT /api/v1/provisioning/templates/{name} provisioning stable RoutePutTemplate
|
||||
// swagger:route PUT /v1/provisioning/templates/{name} provisioning stable RoutePutTemplate
|
||||
//
|
||||
// Updates an existing notification template.
|
||||
//
|
||||
@@ -27,7 +27,7 @@ package definitions
|
||||
// 202: NotificationTemplate
|
||||
// 400: ValidationError
|
||||
|
||||
// swagger:route DELETE /api/v1/provisioning/templates/{name} provisioning stable RouteDeleteTemplate
|
||||
// swagger:route DELETE /v1/provisioning/templates/{name} provisioning stable RouteDeleteTemplate
|
||||
//
|
||||
// Delete a template.
|
||||
//
|
||||
|
||||
@@ -2,7 +2,7 @@ package definitions
|
||||
|
||||
import "github.com/grafana/grafana-plugin-sdk-go/data"
|
||||
|
||||
// swagger:route GET /api/v1/rules/history history RouteGetStateHistory
|
||||
// swagger:route GET /v1/rules/history history RouteGetStateHistory
|
||||
//
|
||||
// Query state history.
|
||||
//
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/prometheus/prometheus/promql"
|
||||
)
|
||||
|
||||
// swagger:route Post /api/v1/rule/test/grafana testing RouteTestRuleGrafanaConfig
|
||||
// swagger:route Post /v1/rule/test/grafana testing RouteTestRuleGrafanaConfig
|
||||
//
|
||||
// Test a rule against Grafana ruler
|
||||
//
|
||||
@@ -28,7 +28,7 @@ import (
|
||||
// 400: ValidationError
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route Post /api/v1/rule/test/{DatasourceUID} testing RouteTestRuleConfig
|
||||
// swagger:route Post /v1/rule/test/{DatasourceUID} testing RouteTestRuleConfig
|
||||
//
|
||||
// Test a rule against external data source ruler
|
||||
//
|
||||
@@ -42,7 +42,7 @@ import (
|
||||
// 200: TestRuleResponse
|
||||
// 404: NotFound
|
||||
|
||||
// swagger:route Post /api/v1/eval testing RouteEvalQueries
|
||||
// swagger:route Post /v1/eval testing RouteEvalQueries
|
||||
//
|
||||
// Test rule
|
||||
//
|
||||
@@ -55,7 +55,7 @@ import (
|
||||
// Responses:
|
||||
// 200: EvalQueriesResponse
|
||||
|
||||
// swagger:route Post /api/v1/rule/backtest testing BacktestConfig
|
||||
// swagger:route Post /v1/rule/backtest testing BacktestConfig
|
||||
//
|
||||
// Test rule
|
||||
//
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package definitions
|
||||
|
||||
// swagger:route GET /api/v1/upgrade/org upgrade RouteGetOrgUpgrade
|
||||
// swagger:route GET /v1/upgrade/org upgrade RouteGetOrgUpgrade
|
||||
//
|
||||
// Get existing alerting upgrade for the current organization.
|
||||
//
|
||||
@@ -10,7 +10,7 @@ package definitions
|
||||
// Responses:
|
||||
// 200: OrgMigrationState
|
||||
|
||||
// swagger:route POST /api/v1/upgrade/org upgrade RoutePostUpgradeOrg
|
||||
// swagger:route POST /v1/upgrade/org upgrade RoutePostUpgradeOrg
|
||||
//
|
||||
// Upgrade all legacy alerts for the current organization.
|
||||
//
|
||||
@@ -20,7 +20,7 @@ package definitions
|
||||
// Responses:
|
||||
// 200: OrgMigrationSummary
|
||||
|
||||
// swagger:route DELETE /api/v1/upgrade/org upgrade RouteDeleteOrgUpgrade
|
||||
// swagger:route DELETE /v1/upgrade/org upgrade RouteDeleteOrgUpgrade
|
||||
//
|
||||
// Delete existing alerting upgrade for the current organization.
|
||||
//
|
||||
@@ -30,7 +30,7 @@ package definitions
|
||||
// Responses:
|
||||
// 200: Ack
|
||||
|
||||
// swagger:route POST /api/v1/upgrade/dashboards/{DashboardID}/panels/{PanelID} upgrade RoutePostUpgradeAlert
|
||||
// swagger:route POST /v1/upgrade/dashboards/{DashboardID}/panels/{PanelID} upgrade RoutePostUpgradeAlert
|
||||
//
|
||||
// Upgrade single legacy dashboard alert for the current organization.
|
||||
//
|
||||
@@ -40,7 +40,7 @@ package definitions
|
||||
// Responses:
|
||||
// 200: OrgMigrationSummary
|
||||
|
||||
// swagger:route POST /api/v1/upgrade/dashboards/{DashboardID} upgrade RoutePostUpgradeDashboard
|
||||
// swagger:route POST /v1/upgrade/dashboards/{DashboardID} upgrade RoutePostUpgradeDashboard
|
||||
//
|
||||
// Upgrade all legacy dashboard alerts on a dashboard for the current organization.
|
||||
//
|
||||
@@ -50,7 +50,7 @@ package definitions
|
||||
// Responses:
|
||||
// 200: OrgMigrationSummary
|
||||
|
||||
// swagger:route POST /api/v1/upgrade/dashboards upgrade RoutePostUpgradeAllDashboards
|
||||
// swagger:route POST /v1/upgrade/dashboards upgrade RoutePostUpgradeAllDashboards
|
||||
//
|
||||
// Upgrade all legacy dashboard alerts for the current organization.
|
||||
//
|
||||
@@ -60,7 +60,7 @@ package definitions
|
||||
// Responses:
|
||||
// 200: OrgMigrationSummary
|
||||
|
||||
// swagger:route POST /api/v1/upgrade/channels upgrade RoutePostUpgradeAllChannels
|
||||
// swagger:route POST /v1/upgrade/channels upgrade RoutePostUpgradeAllChannels
|
||||
//
|
||||
// Upgrade all legacy notification channels for the current organization.
|
||||
//
|
||||
@@ -70,7 +70,7 @@ package definitions
|
||||
// Responses:
|
||||
// 200: OrgMigrationSummary
|
||||
|
||||
// swagger:route POST /api/v1/upgrade/channels/{ChannelID} upgrade RoutePostUpgradeChannel
|
||||
// swagger:route POST /v1/upgrade/channels/{ChannelID} upgrade RoutePostUpgradeChannel
|
||||
//
|
||||
// Upgrade a single legacy notification channel for the current organization.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user