What data source are you using? It might be easier to fetch directly from it instead of via Grafana? Otherwise, it also possible to fetch data via the render api. The render API is the internal API that Grafana uses to fetch data from a data source. It is undocumented but you could easily figure it out by looking at a request and response in the Chrome Developer Tools.
I want to fetch data from table panel