in otava/grafana.py [0:0]
def delete_annotations(self, *ids: int):
"""
Reference:
- https://grafana.com/docs/grafana/latest/http_api/annotations/#delete-annotation-by-id
"""
url = f"{self.url}api/annotations"
for annotation_id in ids:
annotation_url = f"{url}/{annotation_id}"
try:
response = requests.delete(url=annotation_url, auth=(self.__user, self.__password))
response.raise_for_status()
except HTTPError as err:
raise GrafanaError(str(err))