Alerting: Modify endpoint for testing a datasource rule using the UID (#48070)

* Modify testing endpoint to expect the datasource UID

* Update docs
This commit is contained in:
Sofia Papagiannaki
2022-05-17 14:10:20 +03:00
committed by GitHub
parent de3e981985
commit 925784f514
10 changed files with 49 additions and 61 deletions
+9 -10
View File
@@ -3391,11 +3391,12 @@
"type": "object"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"items": {
"$ref": "#/definitions/gettableSilence"
},
"type": "array"
"type": "array",
"x-go-name": "GettableSilences",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"labelSet": {
"additionalProperties": {
@@ -3568,6 +3569,7 @@
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"receiver": {
"description": "Receiver receiver",
"properties": {
"name": {
"description": "name",
@@ -3578,9 +3580,7 @@
"required": [
"name"
],
"type": "object",
"x-go-name": "Receiver",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
"type": "object"
},
"silence": {
"description": "Silence silence",
@@ -5614,7 +5614,7 @@
]
}
},
"/api/v1/rule/test/{DatasourceID}": {
"/api/v1/rule/test/{DatasourceUID}": {
"post": {
"consumes": [
"application/json"
@@ -5623,12 +5623,11 @@
"operationId": "RouteTestRuleConfig",
"parameters": [
{
"description": "DatasourceID should be the numeric datasource identifier",
"format": "int64",
"description": "DatasoureUID should be the datasource UID identifier",
"in": "path",
"name": "DatasourceID",
"name": "DatasourceUID",
"required": true,
"type": "integer"
"type": "string"
},
{
"in": "body",