diff --git a/grafana_api/api/alerting.py b/grafana_api/api/alerting.py index 0be79b9..013ad81 100644 --- a/grafana_api/api/alerting.py +++ b/grafana_api/api/alerting.py @@ -53,7 +53,7 @@ def get_alert_by_id(self, alert_id): :param alert_id: alert ID :return: response """ - path = 'alerts/%s' % alert_id + path = '/alerts/%s' % alert_id r = self.api.GET(path) return r @@ -64,6 +64,6 @@ def pause_alert(self, alert_id, json_dict): :param json_dict: json dict with pause flag True or False :return: response """ - path = 'alerts/%s/pause' % alert_id + path = '/alerts/%s/pause' % alert_id r = self.api.POST(path, json=json_dict) return r diff --git a/grafana_api/api/annotations.py b/grafana_api/api/annotations.py index 0d0423d..cf8ce84 100644 --- a/grafana_api/api/annotations.py +++ b/grafana_api/api/annotations.py @@ -63,7 +63,7 @@ def create_annotation_in_graphite(self, annotation): :param annotation: annotation json request :return: response """ - path = 'annotations/graphite' + path = '/annotations/graphite' r = self.api.POST(path, json=annotation) return r @@ -94,6 +94,6 @@ def delete_region_annotations(self, region_id): :param region_id: ID of region :return: response """ - path = 'annotations/region/%s' % region_id + path = '/annotations/region/%s' % region_id r = self.api.DELETE(path) return r diff --git a/grafana_api/api/dashboard_version.py b/grafana_api/api/dashboard_version.py index 66f4f49..4d5b78f 100644 --- a/grafana_api/api/dashboard_version.py +++ b/grafana_api/api/dashboard_version.py @@ -33,7 +33,7 @@ def restore_dashboard(self, dashboard_id, json_body): :param dashboard_id: Dashboard ID :return: response """ - path = 'dashboards/id/%s/restore' % dashboard_id + path = '/dashboards/id/%s/restore' % dashboard_id r = self.api.POST(path, json=json_body) return r @@ -42,6 +42,6 @@ def compare_dashboard_versions(self, dashboard_body): Method to compare dashboard versions :return: response """ - path = 'api/dashboards/calculate-diff' + path = '/api/dashboards/calculate-diff' r = self.api.POST(path, json=dashboard_body) return r