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:
committed by
GitHub
parent
de3e981985
commit
925784f514
@@ -1,6 +1,6 @@
|
||||
@grafanaRecipient = grafana
|
||||
@lokiDatasourceID = 32
|
||||
@prometheusDatasourceID = 35
|
||||
@lokiDatasourceUID = 9w8X2zlMz
|
||||
@prometheusDatasourceUID = 7DEsN5_Mk
|
||||
|
||||
POST http://admin:admin@localhost:3000/api/v1/rule/test/{{grafanaRecipient}}
|
||||
content-type: application/json
|
||||
@@ -72,7 +72,7 @@ content-type: application/json
|
||||
}
|
||||
|
||||
###
|
||||
POST http://admin:admin@localhost:3000/api/v1/rule/test/{{lokiDatasourceID}}
|
||||
POST http://admin:admin@localhost:3000/api/v1/rule/test/{{lokiDatasourceUID}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
@@ -80,7 +80,7 @@ content-type: application/json
|
||||
}
|
||||
|
||||
###
|
||||
POST http://admin:admin@localhost:3000/api/v1/rule/test/{{prometheusDatasourceID}}
|
||||
POST http://admin:admin@localhost:3000/api/v1/rule/test/{{prometheusDatasourceUID}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
@@ -88,7 +88,7 @@ content-type: application/json
|
||||
}
|
||||
|
||||
### loki recipient - empty payload
|
||||
POST http://admin:admin@localhost:3000/api/v1/rule/test/{{lokiDatasourceID}}
|
||||
POST http://admin:admin@localhost:3000/api/v1/rule/test/{{lokiDatasourceUID}}
|
||||
content-type: application/json
|
||||
|
||||
{}
|
||||
@@ -100,7 +100,7 @@ content-type: application/json
|
||||
{}
|
||||
|
||||
### loki recipient - grafana payload
|
||||
POST http://admin:admin@localhost:3000/api/v1/rule/test/{{lokiDatasourceID}}
|
||||
POST http://admin:admin@localhost:3000/api/v1/rule/test/{{lokiDatasourceUID}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user