The Looker API now uses query slug values for query IDs

The following Looker application API methods don't use a numeric query_id value or, in the case of the Query APIs, a numeric id value. The following methods use the query slug value instead.

What do I need to do?

The query_id field or, in the case of the Query APIs, the id field, is a string data type. The query_id or id fields now return a query slug value in the API response. That query slug value can then be used in any API requests.

For example, if you were to create a query with the Create QueryAPI, the id would be the query slug in the response. You could then use that id to make a subsequent request.

If you have hard-coded numeric query ID values for any of the listed API methods, you need to update your scripts to use query slug values!

How do I find the slug value for a query?

You can find the slug value for a query in the following ways:

  • For an Explore, you can find the slug in the Explore's URL following the qid= variable in the URL.

  • You can find the slug value that is associated with a numeric query ID using System Activity .

    1. From the Looker Explore menu, select the System Activity > HistoryExplore .

    2. From the Queryview, select the IDand Linkdimensions.

    3. Optionally, add a filter on the IDdimension, and enter the query's numeric query ID in the Query IDfilter field.

    4. Click Run.

    5. Click the [Query] link next to the numeric query ID in the Explore results to open an Explore based on that numeric query ID.

    6. You can then use the slug in the Explore's URL, which follows the qid= variable in the URL.

How can I tell if we use any of the updated API endpoints?

You can view a list of the API calls that were made to your Looker instance using the API Usage System Activity Explore .

  1. From the Looker Exploremenu, select the System ActivityExplore, and then select the API Usageview.

  2. Select the Created Date > Dateand Endpointdimensions and the Total Usagemeasure.

  3. Add a filter on the Endpointdimension, and, in the filter field, include any of the updated endpoints listed at the beginning of this document that you want to search for.

  4. Click Run. Looker will display usage information for those endpoints.

Create a Mobile Website
View Site in Mobile | Classic
Share by: