API to generate CSV File

I was wondering if there is an endpoint to generate the CSV file from a graph in Grafana. I want to automatically produce this report if possible. Is there anything like that with Grafana already? If not, how do I request that feature? Thanks.

There is currently no API endpoint for exporting panel data as a CSV file.

The CSV export function is implemented in JavaScript/TypeScript on the frontend so to expose it in the API, it would need to be implemented on the backend and would only work for data sources that have a backend written in Go. So it is not as simple as it might seem to implement this.

You can create a Feature Request issue (just prefix the title with [Feature Request]) in the Grafana GitHub repository and if there is enough interest then we will build it.

I opened feature request #8667 Maybe I can generate some interest.

1 Like

It was closed on June 2017 with the promise to implement feature around 2018
Still no progress in 2019

torkelo commented [on Jun 21, 2017]

dashboards & panels are UI constructs, so to automate them it would have to involve a browser so this is not easy to do.

We hope to introduce a fully featured reporting (PDF/CSV most likely) feature next year.

https://github.com/torkelo closed this [on Jun 21, 2017]

That is UI, do they have API for it?

3 Likes