A API Looker usa agora valores de slug de consulta para IDs de consultas
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Os seguintes métodos da API da aplicação Looker não usam um valor query_id numérico ou, no caso das APIs Query, um valor id numérico. Os seguintes métodos usam o valor do slug de consulta.
O campo query_id ou, no caso das APIs Query, o campo id, é um tipo de dados de string. Os campos query_id ou id devolvem agora um valor de slug de consulta na resposta da API. Em seguida, pode usar esse valor de slug de consulta em quaisquer pedidos da API.
Por exemplo, se criasse uma consulta com a API Create Query, o id seria o slug da consulta na resposta. Em seguida, pode usar esse id para fazer um pedido subsequente.
Se tiver valores de ID de consulta numéricos codificados para qualquer um dos métodos de API apresentados, tem de atualizar os seus scripts para usar valores de slug de consulta!
Como posso encontrar o valor do slug de uma consulta?
Pode encontrar o valor do slug de uma consulta das seguintes formas:
Para uma exploração, pode encontrar o slug no URL da exploração após a variável qid= no URL.
Pode encontrar o valor do slug associado a um ID de consulta numérico através da Atividade do sistema.
Na vista Consulta, selecione as dimensões ID e Associação.
Opcionalmente, adicione um filtro na dimensão ID e introduza o ID numérico da consulta no campo de filtro ID da consulta.
Clique em Executar.
Clique no link [Query] junto ao ID da consulta numérica nos resultados da análise detalhada para abrir uma análise detalhada com base nesse ID da consulta numérica.
Em seguida, pode usar o slug no URL do Explore, que segue a variável qid= no URL.
Como posso saber se usamos algum dos pontos finais da API atualizados?
No menu Explorar do Looker, selecione o conteúdo de Explorar Atividade do sistema e, de seguida, selecione a vista Utilização da API.
Selecione as dimensões Data de criação > Data e Ponto final, bem como a medida Utilização total.
Adicione um filtro na dimensão Ponto final e, no campo de filtro, inclua qualquer um dos pontos finais atualizados indicados no início deste documento que quer pesquisar.
Clique em Executar. O Looker apresenta informações de utilização desses pontos finais.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-20 UTC."],[],[],null,["# The Looker API now uses query slug values for query IDs\n\n| **Note:** The change described on this page will be released in phases:\n|\n| - Looker 24.20 (on December 4, 2024): Americas Early customers\n| - Looker 25.0: Americas Mid customers\n| - Looker 25.2: General Availability (GA)\n\nThe 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.\n\n- Look APIs:\n\n - [Copy Look](/looker/docs/reference/looker-api/latest/methods/Look/copy_look)\n - [Create Look](/looker/docs/reference/looker-api/latest/methods/Look/create_look)\n - [Get Look](/looker/docs/reference/looker-api/latest/methods/Look/look)\n - [Move Look](/looker/docs/reference/looker-api/latest/methods/Look/move_look)\n - [Search Looks](/looker/docs/reference/looker-api/latest/methods/Look/search_looks)\n - [Update Look](/looker/docs/reference/looker-api/latest/methods/Look/update_look)\n - [Get All Looks](/looker/docs/reference/looker-api/latest/methods/Look/all_looks)\n- Dashboard APIs:\n\n - [Search Dashboard Elements](/looker/docs/reference/looker-api/latest/methods/Dashboard/search_dashboard_elements)\n - [Get DashboardElement](/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_element)\n - [Update DashboardElement](/looker/docs/reference/looker-api/latest/methods/Dashboard/update_dashboard_element)\n - [Get All DashboardElements](/looker/docs/reference/looker-api/latest/methods/Dashboard/dashboard_dashboard_elements)\n - [Create DashboardElement](/looker/docs/reference/looker-api/latest/methods/Dashboard/create_dashboard_element)\n- Render Task APIs:\n\n - [Create Look Render Task](/looker/docs/reference/looker-api/latest/methods/RenderTask/create_look_render_task)\n - [Create Query Render Task](/looker/docs/reference/looker-api/latest/methods/RenderTask/create_query_render_task)\n - [Create Dashboard Render Task](/looker/docs/reference/looker-api/latest/methods/RenderTask/create_dashboard_render_task)\n - [Get Render Task](/looker/docs/reference/looker-api/latest/methods/RenderTask/render_task)\n - [Create Dashboard Element Render Task](/looker/docs/reference/looker-api/latest/methods/RenderTask/create_dashboard_element_render_task)\n- Scheduled Plan APIs:\n\n - [Scheduled Plans for Space](/looker/docs/reference/looker-api/latest/methods/ScheduledPlan/scheduled_plans_for_space)\n - [Get Scheduled Plan](/looker/docs/reference/looker-api/latest/methods/ScheduledPlan/scheduled_plan)\n - [Update Scheduled Plan](/looker/docs/reference/looker-api/latest/methods/ScheduledPlan/update_scheduled_plan)\n - [Get All Scheduled Plans](/looker/docs/reference/looker-api/latest/methods/ScheduledPlan/all_scheduled_plans)\n - [Create Scheduled Plan](/looker/docs/reference/looker-api/latest/methods/ScheduledPlan/create_scheduled_plan)\n - [Scheduled Plans for Look](/looker/docs/reference/looker-api/latest/methods/ScheduledPlan/scheduled_plans_for_look)\n - [Scheduled Plans for Dashboard](/looker/docs/reference/looker-api/latest/methods/ScheduledPlan/scheduled_plans_for_dashboard)\n - [Scheduled Plans for LookML Dashboard](/looker/docs/reference/looker-api/latest/methods/ScheduledPlan/scheduled_plans_for_lookml_dashboard)\n- Query APIs:\n\n - [Run Query Async](/looker/docs/reference/looker-api/latest/methods/Query/create_query_task)\n - [Get Query](/looker/docs/reference/looker-api/latest/methods/Query/query)\n - [Get Query for Slug](/looker/docs/reference/looker-api/latest/methods/Query/query_for_slug)\n - [Create Query](/looker/docs/reference/looker-api/latest/methods/Query/create_query)\n - [Run Query](/looker/docs/reference/looker-api/latest/methods/Query/run_query)\n - [Get Merge Query](/looker/docs/reference/looker-api/latest/methods/Query/merge_query)\n - [Create Merge Query](/looker/docs/reference/looker-api/latest/methods/Query/create_merge_query)\n - [Get All Running Queries](/looker/docs/reference/looker-api/latest/methods/Query/all_running_queries)\n\nWhat do I need to do?\n---------------------\n\nThe `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.\n\nFor example, if you were to create a query with the **Create Query** API, the `id` would be the query slug in the response. You could then use that `id` to make a subsequent request.\n\nIf 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**!\n\nHow do I find the slug value for a query?\n-----------------------------------------\n\nYou can find the slug value for a query in the following ways:\n\n- For an Explore, you can find the slug in the Explore's URL following the `qid=` variable in the URL.\n\n- You can find the slug value that is associated with a numeric query ID using [System Activity](/looker/docs/usage-reports-with-system-activity-explores).\n\n | **Note:** To view the System Activity Explores, you must have a [role](/looker/docs/admin-panel-users-roles) that includes the [`see_system_activity` permission](/looker/docs/admin-panel-users-roles#see_system_activity).\n 1. From the Looker **Explore menu** , select the [**System Activity \\\u003e History** Explore](/looker/docs/usage-reports-with-system-activity-explores#history).\n\n 2. From the **Query** view, select the **ID** and **Link** dimensions.\n\n 3. Optionally, add a filter on the **ID** dimension, and enter the query's numeric query ID in the **Query ID** filter field.\n\n 4. Click **Run**.\n\n 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.\n\n 6. You can then use the slug in the Explore's URL, which follows the `qid=` variable in the URL.\n\nHow can I tell if we use any of the updated API endpoints?\n----------------------------------------------------------\n\nYou can view a list of the API calls that were made to your Looker instance using the [API Usage System Activity Explore](/looker/docs/usage-reports-with-system-activity-explores#api_usage).\n\n1. From the Looker **Explore** menu, select the **System Activity** Explore, and then select the **API Usage** view.\n\n2. Select the **Created Date \\\u003e Date** and **Endpoint** dimensions and the **Total Usage** measure.\n\n3. Add a filter on the **Endpoint** dimension, and, in the filter field, include any of the updated endpoints listed at the beginning of this document that you want to search for.\n\n4. Click **Run**. Looker will display usage information for those endpoints."]]