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 authored and GitHub committed 2022-05-17 14:10:20 +03:00
1 parent de3e981985
commit 925784f514
10 files changed
+49 -61

No files matched your search

@@ -62,11 +62,11 @@ func (api *API) RegisterTestingApiEndpoints(srv TestingApiForkingService, m *met
),
)
group.Post(
toMacaronPath("/api/v1/rule/test/{DatasourceID}"),
api.authorize(http.MethodPost, "/api/v1/rule/test/{DatasourceID}"),
toMacaronPath("/api/v1/rule/test/{DatasourceUID}"),
api.authorize(http.MethodPost, "/api/v1/rule/test/{DatasourceUID}"),
metrics.Instrument(
http.MethodPost,
"/api/v1/rule/test/{DatasourceID}",
"/api/v1/rule/test/{DatasourceUID}",
srv.RouteTestRuleConfig,
m,
),