Updating API Scripts for Looker Query API Patch

Hi,

After this patch I need to update my scripts that use the Looker getQuery endpoint to support using slugs instead of queryIds. The way my script originally worked was that it took the Looks from a folder using the searchFolder endpoint and then got the queryIds from the Looks to pass to getQuery. I do not know how to get the slug of a query from the Look or in general how to search for the query associated to a Look after this patch. I tried using the public_slug field of a look with the queries/slug endpoint but that did not work for me. Any help would be greatly appreciated.

2 Likes

Are you perhaps looking for this documentation?

You can use the Looker explore page to build a query and then choose the ‘Share’ option to show the share url for the query. Share urls generally look something like ‘https://looker.yourcompany/x/vwGSbfc’. The trailing ‘vwGSbfc’ is the share slug.

1 Like

Hi @nceniza , I had looked at that documentation but would like a way to do it only through API calls. This documentation suggests using the ‘Share’ option on the explore page. Currently we access looks through the search folder API, so from there I would like to know how to get the slugs for the queries associated with the Looks.