3

I have a visual in grafana. I can manually go to the menu click share -> snapshot -> rendering and export the snapshot. This works great. Is there a way I can script that in python?. Is there some api I can hit that will return the json of a visual?

I was googling around and it looks like I can use the api to create dashboards/visuals and administer them but not sure where how to use the api to export the data.

CheTan Neve
  • 67
  • 1
  • 10

1 Answers1

0

As mentioned in this link : https://mattionline.de/grafana-api-export-graph-as-png/

But you need to Create your API Key eg : click on the grafana icon at the top left corner and go to Admin (Main Org.) -> API Keys add a new key (example: name=export role=viewer) then you will receive your api key (eyJrIjoieDRzbjh6R1__APIKEY__joiZXhwb3J0IiwiaWQiOjF9)