mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
parent
dce9d1e87c
commit
c9211fbd69
pkg/services/ngalert/api
authorization_test.go
tooling
public
@ -47,6 +47,7 @@ func TestAuthorize(t *testing.T) {
|
||||
|
||||
t.Run("should not panic on known routes", func(t *testing.T) {
|
||||
for path, methods := range paths {
|
||||
path := swaggerSpec.Spec().BasePath + path
|
||||
for _, method := range methods {
|
||||
require.NotPanics(t, func() {
|
||||
api.authorize(method, path)
|
||||
|
@ -24,5 +24,5 @@ We have some endpoints that we document publically as being stable, and others t
|
||||
To stabilize an endpoint, add the `stable` tag to its route comment:
|
||||
|
||||
```
|
||||
// swagger:route GET /api/provisioning/contact-points provisioning stable RouteGetContactpoints
|
||||
// swagger:route GET /provisioning/contact-points provisioning stable RouteGetContactpoints
|
||||
```
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"basePath": "/api/v1",
|
||||
"basePath": "/api",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@ -4414,7 +4414,6 @@
|
||||
"type": "object"
|
||||
},
|
||||
"alertGroup": {
|
||||
"description": "AlertGroup alert group",
|
||||
"properties": {
|
||||
"alerts": {
|
||||
"description": "alerts",
|
||||
@ -4438,6 +4437,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"alertGroups": {
|
||||
"description": "AlertGroups alert groups",
|
||||
"items": {
|
||||
"$ref": "#/definitions/alertGroup"
|
||||
},
|
||||
@ -4542,6 +4542,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"gettableAlert": {
|
||||
"description": "GettableAlert gettable alert",
|
||||
"properties": {
|
||||
"annotations": {
|
||||
"$ref": "#/definitions/labelSet"
|
||||
@ -4597,7 +4598,6 @@
|
||||
"type": "object"
|
||||
},
|
||||
"gettableAlerts": {
|
||||
"description": "GettableAlerts gettable alerts",
|
||||
"items": {
|
||||
"$ref": "#/definitions/gettableAlert"
|
||||
},
|
||||
@ -4652,13 +4652,13 @@
|
||||
"type": "object"
|
||||
},
|
||||
"gettableSilences": {
|
||||
"description": "GettableSilences gettable silences",
|
||||
"items": {
|
||||
"$ref": "#/definitions/gettableSilence"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"integration": {
|
||||
"description": "Integration integration",
|
||||
"properties": {
|
||||
"lastNotifyAttempt": {
|
||||
"description": "A timestamp indicating the last attempt to deliver a notification regardless of the outcome.\nFormat: date-time",
|
||||
@ -4840,6 +4840,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"receiver": {
|
||||
"description": "Receiver receiver",
|
||||
"properties": {
|
||||
"active": {
|
||||
"description": "active",
|
||||
@ -4959,7 +4960,7 @@
|
||||
"version": "1.1.0"
|
||||
},
|
||||
"paths": {
|
||||
"/api/v1/provisioning/alert-rules": {
|
||||
"/v1/provisioning/alert-rules": {
|
||||
"get": {
|
||||
"operationId": "RouteGetAlertRules",
|
||||
"responses": {
|
||||
@ -5014,7 +5015,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/alert-rules/export": {
|
||||
"/v1/provisioning/alert-rules/export": {
|
||||
"get": {
|
||||
"operationId": "RouteGetAlertRulesExport",
|
||||
"parameters": [
|
||||
@ -5071,7 +5072,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/alert-rules/{UID}": {
|
||||
"/v1/provisioning/alert-rules/{UID}": {
|
||||
"delete": {
|
||||
"operationId": "RouteDeleteAlertRule",
|
||||
"parameters": [
|
||||
@ -5171,7 +5172,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/alert-rules/{UID}/export": {
|
||||
"/v1/provisioning/alert-rules/{UID}/export": {
|
||||
"get": {
|
||||
"operationId": "RouteGetAlertRuleExport",
|
||||
"parameters": [
|
||||
@ -5219,7 +5220,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/contact-points": {
|
||||
"/v1/provisioning/contact-points": {
|
||||
"get": {
|
||||
"operationId": "RouteGetContactpoints",
|
||||
"parameters": [
|
||||
@ -5282,7 +5283,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/contact-points/export": {
|
||||
"/v1/provisioning/contact-points/export": {
|
||||
"get": {
|
||||
"operationId": "RouteGetContactpointsExport",
|
||||
"parameters": [
|
||||
@ -5334,7 +5335,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/contact-points/{UID}": {
|
||||
"/v1/provisioning/contact-points/{UID}": {
|
||||
"delete": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@ -5405,7 +5406,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}": {
|
||||
"/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}": {
|
||||
"get": {
|
||||
"operationId": "RouteGetAlertRuleGroup",
|
||||
"parameters": [
|
||||
@ -5489,7 +5490,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}/export": {
|
||||
"/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}/export": {
|
||||
"get": {
|
||||
"operationId": "RouteGetAlertRuleGroupExport",
|
||||
"parameters": [
|
||||
@ -5542,7 +5543,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/mute-timings": {
|
||||
"/v1/provisioning/mute-timings": {
|
||||
"get": {
|
||||
"operationId": "RouteGetMuteTimings",
|
||||
"responses": {
|
||||
@ -5597,7 +5598,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/mute-timings/export": {
|
||||
"/v1/provisioning/mute-timings/export": {
|
||||
"get": {
|
||||
"operationId": "RouteExportMuteTimings",
|
||||
"parameters": [
|
||||
@ -5636,7 +5637,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/mute-timings/{name}": {
|
||||
"/v1/provisioning/mute-timings/{name}": {
|
||||
"delete": {
|
||||
"operationId": "RouteDeleteMuteTiming",
|
||||
"parameters": [
|
||||
@ -5737,7 +5738,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/mute-timings/{name}/export": {
|
||||
"/v1/provisioning/mute-timings/{name}/export": {
|
||||
"get": {
|
||||
"operationId": "RouteExportMuteTiming",
|
||||
"parameters": [
|
||||
@ -5783,7 +5784,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/policies": {
|
||||
"/v1/provisioning/policies": {
|
||||
"delete": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@ -5857,7 +5858,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/policies/export": {
|
||||
"/v1/provisioning/policies/export": {
|
||||
"get": {
|
||||
"operationId": "RouteGetPolicyTreeExport",
|
||||
"responses": {
|
||||
@ -5880,7 +5881,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/templates": {
|
||||
"/v1/provisioning/templates": {
|
||||
"get": {
|
||||
"operationId": "RouteGetTemplates",
|
||||
"responses": {
|
||||
@ -5900,7 +5901,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/templates/{name}": {
|
||||
"/v1/provisioning/templates/{name}": {
|
||||
"delete": {
|
||||
"operationId": "RouteDeleteTemplate",
|
||||
"parameters": [
|
||||
|
@ -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.
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"basePath": "/api/v1",
|
||||
"basePath": "/api",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@ -4172,7 +4172,6 @@
|
||||
"type": "object"
|
||||
},
|
||||
"URL": {
|
||||
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use the EscapedPath method, which preserves\nthe original encoding of Path.\n\nThe RawPath field is an optional field which is only set when the default\nencoding of Path is different from the escaped path. See the EscapedPath method\nfor more details.\n\nURL's String method uses the EscapedPath method to obtain the path.",
|
||||
"properties": {
|
||||
"ForceQuery": {
|
||||
"type": "boolean"
|
||||
@ -4208,7 +4207,7 @@
|
||||
"$ref": "#/definitions/Userinfo"
|
||||
}
|
||||
},
|
||||
"title": "A URL represents a parsed URL (technically, a URI reference).",
|
||||
"title": "URL is a custom URL type that allows validation at configuration load time.",
|
||||
"type": "object"
|
||||
},
|
||||
"UpdateRuleGroupResponse": {
|
||||
@ -4414,7 +4413,6 @@
|
||||
"type": "object"
|
||||
},
|
||||
"alertGroup": {
|
||||
"description": "AlertGroup alert group",
|
||||
"properties": {
|
||||
"alerts": {
|
||||
"description": "alerts",
|
||||
@ -4599,13 +4597,13 @@
|
||||
"type": "object"
|
||||
},
|
||||
"gettableAlerts": {
|
||||
"description": "GettableAlerts gettable alerts",
|
||||
"items": {
|
||||
"$ref": "#/definitions/gettableAlert"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"gettableSilence": {
|
||||
"description": "GettableSilence gettable silence",
|
||||
"properties": {
|
||||
"comment": {
|
||||
"description": "comment",
|
||||
@ -4842,7 +4840,6 @@
|
||||
"type": "object"
|
||||
},
|
||||
"receiver": {
|
||||
"description": "Receiver receiver",
|
||||
"properties": {
|
||||
"active": {
|
||||
"description": "active",
|
||||
@ -4962,7 +4959,7 @@
|
||||
"version": "1.1.0"
|
||||
},
|
||||
"paths": {
|
||||
"/api/alertmanager/grafana/api/v2/alerts": {
|
||||
"/alertmanager/grafana/api/v2/alerts": {
|
||||
"get": {
|
||||
"description": "get alertmanager alerts",
|
||||
"operationId": "RouteGetGrafanaAMAlerts",
|
||||
@ -5023,7 +5020,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/api/v2/alerts/groups": {
|
||||
"/alertmanager/grafana/api/v2/alerts/groups": {
|
||||
"get": {
|
||||
"description": "get alertmanager alerts",
|
||||
"operationId": "RouteGetGrafanaAMAlertGroups",
|
||||
@ -5084,7 +5081,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/api/v2/silence/{SilenceId}": {
|
||||
"/alertmanager/grafana/api/v2/silence/{SilenceId}": {
|
||||
"delete": {
|
||||
"description": "delete silence",
|
||||
"operationId": "RouteDeleteGrafanaSilence",
|
||||
@ -5144,7 +5141,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/api/v2/silences": {
|
||||
"/alertmanager/grafana/api/v2/silences": {
|
||||
"get": {
|
||||
"description": "get silences",
|
||||
"operationId": "RouteGetGrafanaSilences",
|
||||
@ -5207,7 +5204,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/api/v2/status": {
|
||||
"/alertmanager/grafana/api/v2/status": {
|
||||
"get": {
|
||||
"description": "get alertmanager status and configuration",
|
||||
"operationId": "RouteGetGrafanaAMStatus",
|
||||
@ -5230,7 +5227,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/config/api/v1/alerts": {
|
||||
"/alertmanager/grafana/config/api/v1/alerts": {
|
||||
"delete": {
|
||||
"description": "deletes the Alerting config for a tenant",
|
||||
"operationId": "RouteDeleteGrafanaAlertingConfig",
|
||||
@ -5304,7 +5301,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/config/api/v1/receivers": {
|
||||
"/alertmanager/grafana/config/api/v1/receivers": {
|
||||
"get": {
|
||||
"description": "Get a list of all receivers",
|
||||
"operationId": "RouteGetGrafanaReceivers",
|
||||
@ -5318,7 +5315,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/config/api/v1/receivers/test": {
|
||||
"/alertmanager/grafana/config/api/v1/receivers/test": {
|
||||
"post": {
|
||||
"operationId": "RoutePostTestGrafanaReceivers",
|
||||
"parameters": [
|
||||
@ -5380,7 +5377,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/config/api/v1/templates/test": {
|
||||
"/alertmanager/grafana/config/api/v1/templates/test": {
|
||||
"post": {
|
||||
"operationId": "RoutePostTestGrafanaTemplates",
|
||||
"parameters": [
|
||||
@ -5427,7 +5424,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/config/history": {
|
||||
"/alertmanager/grafana/config/history": {
|
||||
"get": {
|
||||
"description": "gets Alerting configurations that were successfully applied in the past",
|
||||
"operationId": "RouteGetGrafanaAlertingConfigHistory",
|
||||
@ -5450,7 +5447,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/config/history/{id}/_activate": {
|
||||
"/alertmanager/grafana/config/history/{id}/_activate": {
|
||||
"post": {
|
||||
"description": "revert Alerting configuration to the historical configuration specified by the given id",
|
||||
"operationId": "RoutePostGrafanaAlertingConfigHistoryActivate",
|
||||
@ -5489,7 +5486,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/alerts": {
|
||||
"/alertmanager/{DatasourceUID}/api/v2/alerts": {
|
||||
"get": {
|
||||
"description": "get alertmanager alerts",
|
||||
"operationId": "RouteGetAMAlerts",
|
||||
@ -5609,7 +5606,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/alerts/groups": {
|
||||
"/alertmanager/{DatasourceUID}/api/v2/alerts/groups": {
|
||||
"get": {
|
||||
"description": "get alertmanager alerts",
|
||||
"operationId": "RouteGetAMAlertGroups",
|
||||
@ -5683,7 +5680,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId}": {
|
||||
"/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId}": {
|
||||
"delete": {
|
||||
"description": "delete silence",
|
||||
"operationId": "RouteDeleteSilence",
|
||||
@ -5769,7 +5766,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/silences": {
|
||||
"/alertmanager/{DatasourceUID}/api/v2/silences": {
|
||||
"get": {
|
||||
"description": "get silences",
|
||||
"operationId": "RouteGetSilences",
|
||||
@ -5858,7 +5855,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/status": {
|
||||
"/alertmanager/{DatasourceUID}/api/v2/status": {
|
||||
"get": {
|
||||
"description": "get alertmanager status and configuration",
|
||||
"operationId": "RouteGetAMStatus",
|
||||
@ -5896,7 +5893,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceUID}/config/api/v1/alerts": {
|
||||
"/alertmanager/{DatasourceUID}/config/api/v1/alerts": {
|
||||
"delete": {
|
||||
"description": "deletes the Alerting config for a tenant",
|
||||
"operationId": "RouteDeleteAlertingConfig",
|
||||
@ -6013,7 +6010,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/prometheus/grafana/api/v1/alerts": {
|
||||
"/prometheus/grafana/api/v1/alerts": {
|
||||
"get": {
|
||||
"description": "gets the current alerts",
|
||||
"operationId": "RouteGetGrafanaAlertStatuses",
|
||||
@ -6039,7 +6036,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/prometheus/grafana/api/v1/rules": {
|
||||
"/prometheus/grafana/api/v1/rules": {
|
||||
"get": {
|
||||
"description": "gets the evaluation statuses of all rules",
|
||||
"operationId": "RouteGetGrafanaRuleStatuses",
|
||||
@ -6078,7 +6075,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/prometheus/{DatasourceUID}/api/v1/alerts": {
|
||||
"/prometheus/{DatasourceUID}/api/v1/alerts": {
|
||||
"get": {
|
||||
"description": "gets the current alerts",
|
||||
"operationId": "RouteGetAlertStatuses",
|
||||
@ -6110,7 +6107,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/prometheus/{DatasourceUID}/api/v1/rules": {
|
||||
"/prometheus/{DatasourceUID}/api/v1/rules": {
|
||||
"get": {
|
||||
"description": "gets the evaluation statuses of all rules",
|
||||
"operationId": "RouteGetRuleStatuses",
|
||||
@ -6142,7 +6139,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/ruler/grafana/api/v1/export/rules": {
|
||||
"/ruler/grafana/api/v1/export/rules": {
|
||||
"get": {
|
||||
"consumes": [
|
||||
"application/json",
|
||||
@ -6209,7 +6206,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/ruler/grafana/api/v1/rules": {
|
||||
"/ruler/grafana/api/v1/rules": {
|
||||
"get": {
|
||||
"description": "List rule groups",
|
||||
"operationId": "RouteGetGrafanaRulesConfig",
|
||||
@ -6248,7 +6245,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/ruler/grafana/api/v1/rules/{Namespace}": {
|
||||
"/ruler/grafana/api/v1/rules/{Namespace}": {
|
||||
"delete": {
|
||||
"description": "Delete namespace",
|
||||
"operationId": "RouteDeleteNamespaceGrafanaRulesConfig",
|
||||
@ -6354,7 +6351,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/ruler/grafana/api/v1/rules/{Namespace}/export": {
|
||||
"/ruler/grafana/api/v1/rules/{Namespace}/export": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json",
|
||||
@ -6414,7 +6411,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/ruler/grafana/api/v1/rules/{Namespace}/{Groupname}": {
|
||||
"/ruler/grafana/api/v1/rules/{Namespace}/{Groupname}": {
|
||||
"delete": {
|
||||
"description": "Delete rule group",
|
||||
"operationId": "RouteDeleteGrafanaRuleGroupConfig",
|
||||
@ -6491,7 +6488,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/ruler/{DatasourceUID}/api/v1/rules": {
|
||||
"/ruler/{DatasourceUID}/api/v1/rules": {
|
||||
"get": {
|
||||
"description": "List rule groups",
|
||||
"operationId": "RouteGetRulesConfig",
|
||||
@ -6543,7 +6540,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/ruler/{DatasourceUID}/api/v1/rules/{Namespace}": {
|
||||
"/ruler/{DatasourceUID}/api/v1/rules/{Namespace}": {
|
||||
"delete": {
|
||||
"description": "Delete namespace",
|
||||
"operationId": "RouteDeleteNamespaceRulesConfig",
|
||||
@ -6688,7 +6685,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/ruler/{DatasourceUID}/api/v1/rules/{Namespace}/{Groupname}": {
|
||||
"/ruler/{DatasourceUID}/api/v1/rules/{Namespace}/{Groupname}": {
|
||||
"delete": {
|
||||
"description": "Delete rule group",
|
||||
"operationId": "RouteDeleteRuleGroupConfig",
|
||||
@ -6791,7 +6788,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/eval": {
|
||||
"/v1/eval": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@ -6823,7 +6820,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/ngalert": {
|
||||
"/v1/ngalert": {
|
||||
"get": {
|
||||
"description": "Get the status of the alerting engine",
|
||||
"operationId": "RouteGetStatus",
|
||||
@ -6843,7 +6840,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/ngalert/admin_config": {
|
||||
"/v1/ngalert/admin_config": {
|
||||
"delete": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@ -6932,7 +6929,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/ngalert/alertmanagers": {
|
||||
"/v1/ngalert/alertmanagers": {
|
||||
"get": {
|
||||
"operationId": "RouteGetAlertmanagers",
|
||||
"produces": [
|
||||
@ -6952,7 +6949,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/alert-rules": {
|
||||
"/v1/provisioning/alert-rules": {
|
||||
"get": {
|
||||
"operationId": "RouteGetAlertRules",
|
||||
"responses": {
|
||||
@ -7007,7 +7004,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/alert-rules/export": {
|
||||
"/v1/provisioning/alert-rules/export": {
|
||||
"get": {
|
||||
"operationId": "RouteGetAlertRulesExport",
|
||||
"parameters": [
|
||||
@ -7064,7 +7061,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/alert-rules/{UID}": {
|
||||
"/v1/provisioning/alert-rules/{UID}": {
|
||||
"delete": {
|
||||
"operationId": "RouteDeleteAlertRule",
|
||||
"parameters": [
|
||||
@ -7164,7 +7161,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/alert-rules/{UID}/export": {
|
||||
"/v1/provisioning/alert-rules/{UID}/export": {
|
||||
"get": {
|
||||
"operationId": "RouteGetAlertRuleExport",
|
||||
"parameters": [
|
||||
@ -7212,7 +7209,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/contact-points": {
|
||||
"/v1/provisioning/contact-points": {
|
||||
"get": {
|
||||
"operationId": "RouteGetContactpoints",
|
||||
"parameters": [
|
||||
@ -7275,7 +7272,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/contact-points/export": {
|
||||
"/v1/provisioning/contact-points/export": {
|
||||
"get": {
|
||||
"operationId": "RouteGetContactpointsExport",
|
||||
"parameters": [
|
||||
@ -7327,7 +7324,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/contact-points/{UID}": {
|
||||
"/v1/provisioning/contact-points/{UID}": {
|
||||
"delete": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@ -7398,7 +7395,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}": {
|
||||
"/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}": {
|
||||
"get": {
|
||||
"operationId": "RouteGetAlertRuleGroup",
|
||||
"parameters": [
|
||||
@ -7482,7 +7479,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}/export": {
|
||||
"/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}/export": {
|
||||
"get": {
|
||||
"operationId": "RouteGetAlertRuleGroupExport",
|
||||
"parameters": [
|
||||
@ -7535,7 +7532,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/mute-timings": {
|
||||
"/v1/provisioning/mute-timings": {
|
||||
"get": {
|
||||
"operationId": "RouteGetMuteTimings",
|
||||
"responses": {
|
||||
@ -7590,7 +7587,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/mute-timings/export": {
|
||||
"/v1/provisioning/mute-timings/export": {
|
||||
"get": {
|
||||
"operationId": "RouteExportMuteTimings",
|
||||
"parameters": [
|
||||
@ -7629,7 +7626,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/mute-timings/{name}": {
|
||||
"/v1/provisioning/mute-timings/{name}": {
|
||||
"delete": {
|
||||
"operationId": "RouteDeleteMuteTiming",
|
||||
"parameters": [
|
||||
@ -7730,7 +7727,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/mute-timings/{name}/export": {
|
||||
"/v1/provisioning/mute-timings/{name}/export": {
|
||||
"get": {
|
||||
"operationId": "RouteExportMuteTiming",
|
||||
"parameters": [
|
||||
@ -7776,7 +7773,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/policies": {
|
||||
"/v1/provisioning/policies": {
|
||||
"delete": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@ -7850,7 +7847,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/policies/export": {
|
||||
"/v1/provisioning/policies/export": {
|
||||
"get": {
|
||||
"operationId": "RouteGetPolicyTreeExport",
|
||||
"responses": {
|
||||
@ -7873,7 +7870,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/templates": {
|
||||
"/v1/provisioning/templates": {
|
||||
"get": {
|
||||
"operationId": "RouteGetTemplates",
|
||||
"responses": {
|
||||
@ -7893,7 +7890,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/templates/{name}": {
|
||||
"/v1/provisioning/templates/{name}": {
|
||||
"delete": {
|
||||
"operationId": "RouteDeleteTemplate",
|
||||
"parameters": [
|
||||
@ -7988,7 +7985,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/rule/backtest": {
|
||||
"/v1/rule/backtest": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@ -8020,7 +8017,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/rule/test/grafana": {
|
||||
"/v1/rule/test/grafana": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@ -8061,7 +8058,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/rule/test/{DatasourceUID}": {
|
||||
"/v1/rule/test/{DatasourceUID}": {
|
||||
"post": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@ -8106,7 +8103,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/rules/history": {
|
||||
"/v1/rules/history": {
|
||||
"get": {
|
||||
"operationId": "RouteGetStateHistory",
|
||||
"produces": [
|
||||
@ -8123,7 +8120,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/upgrade/channels": {
|
||||
"/v1/upgrade/channels": {
|
||||
"post": {
|
||||
"operationId": "RoutePostUpgradeAllChannels",
|
||||
"parameters": [
|
||||
@ -8152,7 +8149,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/upgrade/channels/{ChannelID}": {
|
||||
"/v1/upgrade/channels/{ChannelID}": {
|
||||
"post": {
|
||||
"operationId": "RoutePostUpgradeChannel",
|
||||
"parameters": [
|
||||
@ -8181,7 +8178,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/upgrade/dashboards": {
|
||||
"/v1/upgrade/dashboards": {
|
||||
"post": {
|
||||
"operationId": "RoutePostUpgradeAllDashboards",
|
||||
"produces": [
|
||||
@ -8201,7 +8198,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/upgrade/dashboards/{DashboardID}": {
|
||||
"/v1/upgrade/dashboards/{DashboardID}": {
|
||||
"post": {
|
||||
"operationId": "RoutePostUpgradeDashboard",
|
||||
"parameters": [
|
||||
@ -8237,7 +8234,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/upgrade/dashboards/{DashboardID}/panels/{PanelID}": {
|
||||
"/v1/upgrade/dashboards/{DashboardID}/panels/{PanelID}": {
|
||||
"post": {
|
||||
"operationId": "RoutePostUpgradeAlert",
|
||||
"parameters": [
|
||||
@ -8273,7 +8270,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/upgrade/org": {
|
||||
"/v1/upgrade/org": {
|
||||
"delete": {
|
||||
"operationId": "RouteDeleteOrgUpgrade",
|
||||
"produces": [
|
||||
|
@ -15,9 +15,9 @@
|
||||
"title": "Grafana Alerting API.",
|
||||
"version": "1.1.0"
|
||||
},
|
||||
"basePath": "/api/v1",
|
||||
"basePath": "/api",
|
||||
"paths": {
|
||||
"/api/alertmanager/grafana/api/v2/alerts": {
|
||||
"/alertmanager/grafana/api/v2/alerts": {
|
||||
"get": {
|
||||
"description": "get alertmanager alerts",
|
||||
"tags": [
|
||||
@ -78,7 +78,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/api/v2/alerts/groups": {
|
||||
"/alertmanager/grafana/api/v2/alerts/groups": {
|
||||
"get": {
|
||||
"description": "get alertmanager alerts",
|
||||
"tags": [
|
||||
@ -139,7 +139,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/api/v2/silence/{SilenceId}": {
|
||||
"/alertmanager/grafana/api/v2/silence/{SilenceId}": {
|
||||
"get": {
|
||||
"description": "get silence",
|
||||
"tags": [
|
||||
@ -199,7 +199,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/api/v2/silences": {
|
||||
"/alertmanager/grafana/api/v2/silences": {
|
||||
"get": {
|
||||
"description": "get silences",
|
||||
"tags": [
|
||||
@ -262,7 +262,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/api/v2/status": {
|
||||
"/alertmanager/grafana/api/v2/status": {
|
||||
"get": {
|
||||
"description": "get alertmanager status and configuration",
|
||||
"tags": [
|
||||
@ -285,7 +285,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/config/api/v1/alerts": {
|
||||
"/alertmanager/grafana/config/api/v1/alerts": {
|
||||
"get": {
|
||||
"description": "gets an Alerting config",
|
||||
"tags": [
|
||||
@ -359,7 +359,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/config/api/v1/receivers": {
|
||||
"/alertmanager/grafana/config/api/v1/receivers": {
|
||||
"get": {
|
||||
"description": "Get a list of all receivers",
|
||||
"tags": [
|
||||
@ -373,7 +373,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/config/api/v1/receivers/test": {
|
||||
"/alertmanager/grafana/config/api/v1/receivers/test": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"alertmanager"
|
||||
@ -435,7 +435,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/config/api/v1/templates/test": {
|
||||
"/alertmanager/grafana/config/api/v1/templates/test": {
|
||||
"post": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
@ -482,7 +482,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/config/history": {
|
||||
"/alertmanager/grafana/config/history": {
|
||||
"get": {
|
||||
"description": "gets Alerting configurations that were successfully applied in the past",
|
||||
"tags": [
|
||||
@ -505,7 +505,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/grafana/config/history/{id}/_activate": {
|
||||
"/alertmanager/grafana/config/history/{id}/_activate": {
|
||||
"post": {
|
||||
"description": "revert Alerting configuration to the historical configuration specified by the given id",
|
||||
"tags": [
|
||||
@ -544,7 +544,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/alerts": {
|
||||
"/alertmanager/{DatasourceUID}/api/v2/alerts": {
|
||||
"get": {
|
||||
"description": "get alertmanager alerts",
|
||||
"tags": [
|
||||
@ -664,7 +664,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/alerts/groups": {
|
||||
"/alertmanager/{DatasourceUID}/api/v2/alerts/groups": {
|
||||
"get": {
|
||||
"description": "get alertmanager alerts",
|
||||
"tags": [
|
||||
@ -738,7 +738,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId}": {
|
||||
"/alertmanager/{DatasourceUID}/api/v2/silence/{SilenceId}": {
|
||||
"get": {
|
||||
"description": "get silence",
|
||||
"tags": [
|
||||
@ -824,7 +824,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/silences": {
|
||||
"/alertmanager/{DatasourceUID}/api/v2/silences": {
|
||||
"get": {
|
||||
"description": "get silences",
|
||||
"tags": [
|
||||
@ -913,7 +913,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceUID}/api/v2/status": {
|
||||
"/alertmanager/{DatasourceUID}/api/v2/status": {
|
||||
"get": {
|
||||
"description": "get alertmanager status and configuration",
|
||||
"tags": [
|
||||
@ -951,7 +951,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/alertmanager/{DatasourceUID}/config/api/v1/alerts": {
|
||||
"/alertmanager/{DatasourceUID}/config/api/v1/alerts": {
|
||||
"get": {
|
||||
"description": "gets an Alerting config",
|
||||
"tags": [
|
||||
@ -1068,7 +1068,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/prometheus/grafana/api/v1/alerts": {
|
||||
"/prometheus/grafana/api/v1/alerts": {
|
||||
"get": {
|
||||
"description": "gets the current alerts",
|
||||
"tags": [
|
||||
@ -1094,7 +1094,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/prometheus/grafana/api/v1/rules": {
|
||||
"/prometheus/grafana/api/v1/rules": {
|
||||
"get": {
|
||||
"description": "gets the evaluation statuses of all rules",
|
||||
"tags": [
|
||||
@ -1133,7 +1133,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/prometheus/{DatasourceUID}/api/v1/alerts": {
|
||||
"/prometheus/{DatasourceUID}/api/v1/alerts": {
|
||||
"get": {
|
||||
"description": "gets the current alerts",
|
||||
"tags": [
|
||||
@ -1165,7 +1165,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/prometheus/{DatasourceUID}/api/v1/rules": {
|
||||
"/prometheus/{DatasourceUID}/api/v1/rules": {
|
||||
"get": {
|
||||
"description": "gets the evaluation statuses of all rules",
|
||||
"tags": [
|
||||
@ -1197,7 +1197,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/ruler/grafana/api/v1/export/rules": {
|
||||
"/ruler/grafana/api/v1/export/rules": {
|
||||
"get": {
|
||||
"description": "List rules in provisioning format",
|
||||
"consumes": [
|
||||
@ -1264,7 +1264,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/ruler/grafana/api/v1/rules": {
|
||||
"/ruler/grafana/api/v1/rules": {
|
||||
"get": {
|
||||
"description": "List rule groups",
|
||||
"produces": [
|
||||
@ -1303,7 +1303,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/ruler/grafana/api/v1/rules/{Namespace}": {
|
||||
"/ruler/grafana/api/v1/rules/{Namespace}": {
|
||||
"get": {
|
||||
"description": "Get rule groups by namespace",
|
||||
"produces": [
|
||||
@ -1409,7 +1409,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/ruler/grafana/api/v1/rules/{Namespace}/export": {
|
||||
"/ruler/grafana/api/v1/rules/{Namespace}/export": {
|
||||
"post": {
|
||||
"description": "Converts submitted rule group to provisioning format",
|
||||
"consumes": [
|
||||
@ -1469,7 +1469,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/ruler/grafana/api/v1/rules/{Namespace}/{Groupname}": {
|
||||
"/ruler/grafana/api/v1/rules/{Namespace}/{Groupname}": {
|
||||
"get": {
|
||||
"description": "Get rule group",
|
||||
"produces": [
|
||||
@ -1546,7 +1546,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/ruler/{DatasourceUID}/api/v1/rules": {
|
||||
"/ruler/{DatasourceUID}/api/v1/rules": {
|
||||
"get": {
|
||||
"description": "List rule groups",
|
||||
"produces": [
|
||||
@ -1598,7 +1598,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/ruler/{DatasourceUID}/api/v1/rules/{Namespace}": {
|
||||
"/ruler/{DatasourceUID}/api/v1/rules/{Namespace}": {
|
||||
"get": {
|
||||
"description": "Get rule groups by namespace",
|
||||
"produces": [
|
||||
@ -1743,7 +1743,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/ruler/{DatasourceUID}/api/v1/rules/{Namespace}/{Groupname}": {
|
||||
"/ruler/{DatasourceUID}/api/v1/rules/{Namespace}/{Groupname}": {
|
||||
"get": {
|
||||
"description": "Get rule group",
|
||||
"produces": [
|
||||
@ -1846,7 +1846,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/eval": {
|
||||
"/v1/eval": {
|
||||
"post": {
|
||||
"description": "Test rule",
|
||||
"consumes": [
|
||||
@ -1878,7 +1878,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/ngalert": {
|
||||
"/v1/ngalert": {
|
||||
"get": {
|
||||
"description": "Get the status of the alerting engine",
|
||||
"produces": [
|
||||
@ -1898,7 +1898,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/ngalert/admin_config": {
|
||||
"/v1/ngalert/admin_config": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
@ -1987,7 +1987,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/ngalert/alertmanagers": {
|
||||
"/v1/ngalert/alertmanagers": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
@ -2007,7 +2007,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/alert-rules": {
|
||||
"/v1/provisioning/alert-rules": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"provisioning",
|
||||
@ -2064,7 +2064,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/alert-rules/export": {
|
||||
"/v1/provisioning/alert-rules/export": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"provisioning",
|
||||
@ -2122,7 +2122,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/alert-rules/{UID}": {
|
||||
"/v1/provisioning/alert-rules/{UID}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"provisioning",
|
||||
@ -2225,7 +2225,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/alert-rules/{UID}/export": {
|
||||
"/v1/provisioning/alert-rules/{UID}/export": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json",
|
||||
@ -2274,7 +2274,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/contact-points": {
|
||||
"/v1/provisioning/contact-points": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"provisioning",
|
||||
@ -2339,7 +2339,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/contact-points/export": {
|
||||
"/v1/provisioning/contact-points/export": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"provisioning",
|
||||
@ -2392,7 +2392,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/contact-points/{UID}": {
|
||||
"/v1/provisioning/contact-points/{UID}": {
|
||||
"put": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@ -2465,7 +2465,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}": {
|
||||
"/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"provisioning",
|
||||
@ -2551,7 +2551,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}/export": {
|
||||
"/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}/export": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json",
|
||||
@ -2605,7 +2605,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/mute-timings": {
|
||||
"/v1/provisioning/mute-timings": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"provisioning",
|
||||
@ -2662,7 +2662,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/mute-timings/export": {
|
||||
"/v1/provisioning/mute-timings/export": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"provisioning",
|
||||
@ -2702,7 +2702,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/mute-timings/{name}": {
|
||||
"/v1/provisioning/mute-timings/{name}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"provisioning",
|
||||
@ -2806,7 +2806,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/mute-timings/{name}/export": {
|
||||
"/v1/provisioning/mute-timings/{name}/export": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"provisioning",
|
||||
@ -2853,7 +2853,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/policies": {
|
||||
"/v1/provisioning/policies": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"provisioning",
|
||||
@ -2930,7 +2930,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/policies/export": {
|
||||
"/v1/provisioning/policies/export": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"provisioning",
|
||||
@ -2954,7 +2954,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/templates": {
|
||||
"/v1/provisioning/templates": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"provisioning",
|
||||
@ -2975,7 +2975,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/provisioning/templates/{name}": {
|
||||
"/v1/provisioning/templates/{name}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"provisioning",
|
||||
@ -3073,7 +3073,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/rule/backtest": {
|
||||
"/v1/rule/backtest": {
|
||||
"post": {
|
||||
"description": "Test rule",
|
||||
"consumes": [
|
||||
@ -3105,7 +3105,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/rule/test/grafana": {
|
||||
"/v1/rule/test/grafana": {
|
||||
"post": {
|
||||
"description": "Test a rule against Grafana ruler",
|
||||
"consumes": [
|
||||
@ -3146,7 +3146,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/rule/test/{DatasourceUID}": {
|
||||
"/v1/rule/test/{DatasourceUID}": {
|
||||
"post": {
|
||||
"description": "Test a rule against external data source ruler",
|
||||
"consumes": [
|
||||
@ -3191,7 +3191,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/rules/history": {
|
||||
"/v1/rules/history": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
@ -3208,7 +3208,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/upgrade/channels": {
|
||||
"/v1/upgrade/channels": {
|
||||
"post": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
@ -3237,7 +3237,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/upgrade/channels/{ChannelID}": {
|
||||
"/v1/upgrade/channels/{ChannelID}": {
|
||||
"post": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
@ -3266,7 +3266,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/upgrade/dashboards": {
|
||||
"/v1/upgrade/dashboards": {
|
||||
"post": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
@ -3286,7 +3286,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/upgrade/dashboards/{DashboardID}": {
|
||||
"/v1/upgrade/dashboards/{DashboardID}": {
|
||||
"post": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
@ -3322,7 +3322,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/upgrade/dashboards/{DashboardID}/panels/{PanelID}": {
|
||||
"/v1/upgrade/dashboards/{DashboardID}/panels/{PanelID}": {
|
||||
"post": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
@ -3358,7 +3358,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/upgrade/org": {
|
||||
"/v1/upgrade/org": {
|
||||
"get": {
|
||||
"produces": [
|
||||
"application/json"
|
||||
@ -7597,9 +7597,8 @@
|
||||
}
|
||||
},
|
||||
"URL": {
|
||||
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use the EscapedPath method, which preserves\nthe original encoding of Path.\n\nThe RawPath field is an optional field which is only set when the default\nencoding of Path is different from the escaped path. See the EscapedPath method\nfor more details.\n\nURL's String method uses the EscapedPath method to obtain the path.",
|
||||
"type": "object",
|
||||
"title": "A URL represents a parsed URL (technically, a URI reference).",
|
||||
"title": "URL is a custom URL type that allows validation at configuration load time.",
|
||||
"properties": {
|
||||
"ForceQuery": {
|
||||
"type": "boolean"
|
||||
@ -7839,7 +7838,6 @@
|
||||
}
|
||||
},
|
||||
"alertGroup": {
|
||||
"description": "AlertGroup alert group",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"alerts",
|
||||
@ -8027,7 +8025,6 @@
|
||||
"$ref": "#/definitions/gettableAlert"
|
||||
},
|
||||
"gettableAlerts": {
|
||||
"description": "GettableAlerts gettable alerts",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/gettableAlert"
|
||||
@ -8035,6 +8032,7 @@
|
||||
"$ref": "#/definitions/gettableAlerts"
|
||||
},
|
||||
"gettableSilence": {
|
||||
"description": "GettableSilence gettable silence",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"comment",
|
||||
@ -8275,7 +8273,6 @@
|
||||
"$ref": "#/definitions/postableSilence"
|
||||
},
|
||||
"receiver": {
|
||||
"description": "Receiver receiver",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"active",
|
||||
|
@ -36,13 +36,13 @@ func (f *{{classname}}Handler) {{nickname}}(ctx *contextmodel.ReqContext) respon
|
||||
func (api *API) Register{{classname}}Endpoints(srv {{classname}}, m *metrics.API) {
|
||||
api.RouteRegister.Group("", func(group routing.RouteRegister){ {{#operations}}{{#operation}}
|
||||
group.{{httpMethod}}(
|
||||
toMacaronPath("{{{path}}}"),
|
||||
toMacaronPath("/api{{{path}}}"),
|
||||
requestmeta.SetOwner(requestmeta.TeamAlerting),
|
||||
requestmeta.SetSLOGroup(requestmeta.SLOGroupHighSlow),
|
||||
api.authorize(http.Method{{httpMethod}}, "{{{path}}}"),
|
||||
api.authorize(http.Method{{httpMethod}}, "/api{{{path}}}"),
|
||||
metrics.Instrument(
|
||||
http.Method{{httpMethod}},
|
||||
"{{{path}}}",
|
||||
"/api{{{path}}}",
|
||||
api.Hooks.Wrap(srv.{{nickname}}),
|
||||
m,
|
||||
),
|
||||
|
@ -4034,6 +4034,32 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"DeviceSearchHitDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"clientIp": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"deviceId": {
|
||||
"type": "string"
|
||||
},
|
||||
"lastSeenAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"userAgent": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DsAccess": {
|
||||
"type": "string"
|
||||
},
|
||||
@ -6553,6 +6579,29 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"SearchDeviceQueryResult": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"devices": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/DeviceSearchHitDTO"
|
||||
}
|
||||
},
|
||||
"page": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"perPage": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"totalCount": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"SearchOrgServiceAccountsResult": {
|
||||
"description": "swagger: model",
|
||||
"type": "object",
|
||||
@ -8523,6 +8572,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"devicesSearchResponse": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/SearchDeviceQueryResult"
|
||||
}
|
||||
},
|
||||
"folderResponse": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
|
File diff suppressed because it is too large
Load Diff
2595
public/openapi3.json
2595
public/openapi3.json
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user