diff --git a/CHANGELOG.md b/CHANGELOG.md index d87d3c1..f6ea7ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Add missing argument `dashboard_uid` to `get_annotation` method. Thanks, @nikita-b. +* Add API method `get_alertrules_all`. Thanks, @harish422. ## 3.5.0 (2022-12-07) diff --git a/grafana_client/elements/alertingprovisioning.py b/grafana_client/elements/alertingprovisioning.py index 0adaba0..e3c1c4f 100644 --- a/grafana_client/elements/alertingprovisioning.py +++ b/grafana_client/elements/alertingprovisioning.py @@ -6,6 +6,15 @@ def __init__(self, client): super(AlertingProvisioning, self).__init__(client) self.client = client + def get_alertrules_all(self): + """ + Gets all alert rules + @return: + """ + get_alertrules_all_path = "/v1/provisioning/alert-rules" + r = self.client.GET(get_alertrules_all_path) + return r + def get_alertrule(self, alertrule_uid): """