Dashboard API


(Ela) #1

We would like to use Looker API to run dashboard queries consisting of many elements (metrics) given a set of dashboard parameters. After obtaining the result they would be available in our product as custom graphs and csv downloads.
The only way of doing this that I currently found is using the Dashboard API to receive all the elements of the dashboard and their queries. Then applying the dashboard filters to each element’s query and running them separately. Afterwards all the elements need to stick back together. Is there a better way of doing this, i.e. running one query for the whole dashboard or querying the dashboard by id?
It seems that this works very well in the UI, where the url works exactly as I would like the API to work: https:/company.looker.com/dashboards/8?Date=4%20weeks&Param1=&Aggregation=day&Param2=someId&filter_config=…

(Izzy) #2

That sounds like the best way to recreate a dashboard in the API to me. In the UI, we probably do pretty much that same thing, where each filter is applied to the query extracted from each element on the dashboard, and then they’re run and put back together.