Export time series data with annotations

  • What Grafana version and what operating system are you using?
  • What are you trying to achieve?
    Exporting data with annotations to csv file
  • How are you trying to achieve it?
url = "MY_URL/api/annotations"

headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer MY_API"
response = requests.get(url, headers=headers)
annotations = response.json()
  • What happened?
    am getting this error: Status Code: 401

  • What did you expect to happen?
    am expecting the json annotation file. Because I can access the annotations using the URL
    Also, I checked the health of my API and it is working fine.

  • I also tried to create a login session but I get this:
    Login failed: {“message”:“Bad request”,“messageId”:“auth.client.notConfigured”,“statusCode”:400,“traceID”:“de7d3892c5f11135772c21c5cdd5f1c5”}

Is there a way to export data with annotations using the dashboard ?

1 Like