Stay organized with collections
Save and categorize content based on your preferences.
Version 4.0.25.14 (latest)
Get the query for a given query slug.
This returns the query for the 'slug' in a query share URL.
The 'slug' is a randomly chosen short string that is used as an alternative to the query's id value
for use in URLs etc. This method exists as a convenience to help you use the API to 'find' queries that
have been created using the Looker UI.
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. You can pass that string to this api method to get details about the query.
Those details include the 'id' that you can use to run the query. Or, you can copy the query body
(perhaps with your own modification) and use that as the basis to make/run new queries.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],[],null,["# Get Query for Slug\n\nVersion 4.0.25.14 (latest)\n\n### Get the query for a given query slug.\n\nThis returns the query for the 'slug' in a query share URL.\n\nThe 'slug' is a randomly chosen short string that is used as an alternative to the query's id value\nfor use in URLs etc. This method exists as a convenience to help you use the API to 'find' queries that\nhave been created using the Looker UI.\n\nYou can use the Looker explore page to build a query and then choose the 'Share' option to\nshow the share url for the query. Share urls generally look something like '\u003chttps://looker.yourcompany/x/vwGSbfc\u003e'.\nThe trailing 'vwGSbfc' is the share slug. You can pass that string to this api method to get details about the query.\nThose details include the 'id' that you can use to run the query. Or, you can copy the query body\n(perhaps with your own modification) and use that as the basis to make/run new queries.\n\nThis will also work with slugs from Looker explore urls like\n'\u003chttps://looker.yourcompany/explore/ecommerce/orders?qid=aogBgL6o3cKK1jN3RoZl5s\u003e'. In this case\n'aogBgL6o3cKK1jN3RoZl5s' is the slug.\n\nRequest\n-------\n\nGET /queries/slug/{slug} \nDatatype \nDescription \nRequest \nHTTP Request \npath \nHTTP Path \nExpand HTTP Path definition... \nslug \nstring \nSlug of query \nquery \nHTTP Query \nExpand HTTP Query definition... \nfields \nstring \nRequested fields.\n\nResponse\n--------\n\n### 200: Query\n\nDatatype \nDescription \n(object) \n[Query](/looker/docs/reference/looker-api/latest/types/Query) \ncan \n*lock* \nobject \nOperations the current user is able to perform on this object \nid \n*lock* \nstring \nUnique Id \nmodel \nstring \nModel \nview \nstring \nExplore Name \nfields \nstring\\[\\] \npivots \nstring\\[\\] \nfill_fields \nstring\\[\\] \nfilters \nobject \nFilters will contain data pertaining to complex filters that do not contain \"or\" conditions. When \"or\" conditions are present, filter data will be found on the \\`filter_expression\\` property. \nfilter_expression \nstring \nFilter Expression \nsorts \nstring\\[\\] \nlimit \nstring \nRow limit. To download unlimited results, set the limit to -1 (negative one). \ncolumn_limit \nstring \nColumn Limit \ntotal \nboolean \nTotal \nrow_total \nstring \nRaw Total \nsubtotals \nstring\\[\\] \nvis_config \nobject \nVisualization configuration properties. These properties are typically opaque and differ based on the type of visualization used. There is no specified set of allowed keys. The values can be any type supported by JSON. A \"type\" key with a string value is often present, and is used by Looker to determine which visualization to present. Visualizations ignore unknown vis_config properties. \nfilter_config \nobject \nThe filter_config represents the state of the filter UI on the explore page for a given query. When running a query via the Looker UI, this parameter takes precedence over \"filters\". When creating a query or modifying an existing query, \"filter_config\" should be set to null. Setting it to any other value could cause unexpected filtering behavior. The format should be considered opaque. \nvisible_ui_sections \nstring \nVisible UI Sections \nslug \n*lock* \nstring \nSlug \ndynamic_fields \nstring \nDynamic Fields \nclient_id \nstring \nClient Id: used to generate shortened explore URLs. If set by client, must be a unique 22 character alphanumeric string. Otherwise one will be generated. \nshare_url \n*lock* \nstring \nShare Url \nexpanded_share_url \n*lock* \nstring \nExpanded Share Url \nurl \n*lock* \nstring \nExpanded Url \nquery_timezone \nstring \nQuery Timezone \nhas_table_calculations \n*lock* \nboolean \nHas Table Calculations\n\n### 400: Bad Request\n\nDatatype \nDescription \n(object) \n[Error](/looker/docs/reference/looker-api/latest/types/Error) \nmessage \n*lock* \nstring \nError details \ndocumentation_url \n*lock* \nstring \nDocumentation link\n\n### 404: Not Found\n\nDatatype \nDescription \n(object) \n[Error](/looker/docs/reference/looker-api/latest/types/Error) \nmessage \n*lock* \nstring \nError details \ndocumentation_url \n*lock* \nstring \nDocumentation link\n\n### 429: Too Many Requests\n\nDatatype \nDescription \n(object) \n[Error](/looker/docs/reference/looker-api/latest/types/Error) \nmessage \n*lock* \nstring \nError details \ndocumentation_url \n*lock* \nstring \nDocumentation link"]]