Looker Community

Swap dashboards without affecting url


We have an existing dashboard that many users have bookmarked. We created a new version of this dashboard that is more optimized for performance. What is the best way to switch the contents of the first dashboard without changing the url?

I know there is an update_dashboard() endpoint using the API, but I haven’t successfully been able to update any dashboards when testing that endpoint. Is there any other way to do this? Does anyone have any tips or suggestions?

Thanks in advance!

Updating dashboards via the API is hard. That’s one of the problems that Gazer helps with, but I don’t think gazer really lets you “swap” dashboards.

I haven’t tried to just update_dashboard() via the API but I’d imagine you could get_dashboard() and copy/paste that into update_dashboard() removing things like slug + dashboard ID… If that’s not working, I can give it a try myself.

What you might be able to do that could be easier, if you can’t figure out the fields to include/exclude in the update_dashboard() call— Get dashboard lookml on the new dashboard & create a LookML dashboard for it, add a lookml_link_id to the dashboard pointing to the new lookml dashboard, and then sync_lookml_dashboard to update the UDD. There’s instructions on the use of sync_lookml_dashboard here:

I think that’d work!

1 Like

We swap dashboards using gazer, they are an update from a dev version which is promoted, we didn’t want to spoil people’s bookmarks and schedules when updating them so we force overwrite which retains the db id.


We also use Gazer to “swap” dashboards and it works for us.

1 Like

Thanks all. I’ll give these solutions a try.

What commands do you use in gazer to do the swap?

Cat dashboard to file and then import it with force on (has to have the same title or name, can’t remember which)

  1. First I export the new version of a dashboard (I export entire space) using this command
gzr space export space_id  --host=host.eu.looker.com --client-id=**** --client-secret=*** --tgz exported_space.tar.tgz
  1. Then I extract tgz file and find my dashboard and run this command
gzr dashboard import Dashboard_XYZ.json space_id --host=host.eu.looker.com --client-id=**** --client-secret=**** --force

I hope it helps