Alerting: modify ruler endpoints for proxying using the datasource UID (#48046)
* Modify ruler endpoints to expect the data source UID * Update frontend * Apply suggestion from code review
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
@prometheusDatasourceID = 35
|
||||
@prometheusDatasourceUID = 7DEsN5_Mk
|
||||
|
||||
// should point to an existing folder named alerting
|
||||
@namespace1 = test
|
||||
|
||||
// create/update test namespace group42 rulegroup
|
||||
POST http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceID}}/api/v1/rules/{{namespace1}}
|
||||
POST http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceUID}}/api/v1/rules/{{namespace1}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
@@ -20,7 +20,7 @@ content-type: application/json
|
||||
|
||||
###
|
||||
// create group101
|
||||
POST http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceID}}/api/v1/rules/{{namespace1}}
|
||||
POST http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceUID}}/api/v1/rules/{{namespace1}}
|
||||
content-type: application/json
|
||||
|
||||
{
|
||||
@@ -36,40 +36,41 @@ content-type: application/json
|
||||
|
||||
###
|
||||
// get group42 rules
|
||||
GET http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceID}}/api/v1/rules/{{namespace1}}/group42
|
||||
GET http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceUID}}/api/v1/rules/{{namespace1}}/group42
|
||||
|
||||
###
|
||||
// get group101 rules
|
||||
GET http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceID}}/api/v1/rules/{{namespace1}}/group101
|
||||
GET http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceUID}}/api/v1/rules/{{namespace1}}/group101
|
||||
|
||||
###
|
||||
// get namespace rules
|
||||
GET http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceID}}/api/v1/rules/{{namespace1}}
|
||||
GET http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceUID}}/api/v1/rules/{{namespace1}}
|
||||
|
||||
###
|
||||
// get org rules
|
||||
GET http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceID}}/api/v1/rules
|
||||
GET http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceUID}}/api/v1/rules
|
||||
|
||||
###
|
||||
// delete group42 rules
|
||||
DELETE http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceID}}/api/v1/rules/{{namespace1}}/group42
|
||||
DELETE http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceUID}}/api/v1/rules/{{namespace1}}/group42
|
||||
|
||||
###
|
||||
// get namespace rules - only group101 should be listed
|
||||
GET http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceID}}/api/v1/rules/{{namespace1}}
|
||||
GET http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceUID}}/api/v1/rules/{{namespace1}}
|
||||
|
||||
###
|
||||
// delete namespace rules
|
||||
DELETE http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceID}}/api/v1/rules/{{namespace1}}
|
||||
DELETE http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceUID}}/api/v1/rules/{{namespace1}}
|
||||
|
||||
###
|
||||
// get namespace rules - no rules
|
||||
GET http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceID}}/api/v1/rules/{{namespace1}}
|
||||
GET http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceUID}}/api/v1/rules/{{namespace1}}
|
||||
|
||||
###
|
||||
// get group42 rules
|
||||
GET http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceID}}/api/v1/rules/{{namespace1}}/group42
|
||||
GET http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceUID}}/api/v1/rules/{{namespace1}}/group42
|
||||
|
||||
###
|
||||
// get namespace rules
|
||||
GET http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceID}}/api/v1/rules/{{namespace1}}
|
||||
GET http://admin:admin@localhost:3000/api/ruler/{{prometheusDatasourceUID}}/api/v1/rules/{{namespace1}}
|
||||
U
|
||||
Reference in New Issue
Block a user