Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
L'API Looker consente di accedere alla maggior parte delle funzionalità di Looker grazie a una comoda API REST basata su JSON. Include una varietà di endpoint, dall'esecuzione di query in vari formati alla gestione di utenti, contenuti, pianificazioni, configurazioni delle istanze e altro ancora.
L'API può essere utilizzata in molti casi d'uso. Alcuni esempi includono strumenti operativi interni, analisi incorporate altamente personalizzate rivolte ai clienti, integrazioni di app mobile, strumenti amministrativi specializzati di Looker e altro ancora.
Utilizzo dell'API
Puoi utilizzare l'API direttamente tramite richieste HTTPS o tramite la comodità di un SDK specifico per la lingua.
Inoltre, l'API prevede alcune modalità di autenticazione, che possono aiutarti a prendere decisioni in merito all'architettura. I servizi di backend possono autenticarsi con le credenziali API, utilizzare l'API con un account di servizio e rappresentare comodamente le richieste API per conto degli utenti finali. In alternativa, i client frontend possono sfruttare l'autenticazione OAuth (Authorization Code PKCE), senza la necessità di gestire i client secret sensibili.
Ecco un esempio dei modi più comuni in cui l'API viene utilizzata end-to-end:
Solo backend
Esegui l'autenticazione con le credenziali API: comuni per script della riga di comando, attività amministrative o ambienti sandbox
Frontend e backend
Fornisci a un server delle applicazioni un singolo account di servizio e le relative credenziali ed effettua chiamate API tramite il account di servizio
Fornisci un server delle applicazioni con un singolo account di servizio e credenziali, ma utilizza la funzionalità sudo o login_as_user di Looker per effettuare chiamate per conto dell'utente finale
Esegui l'autenticazione con un server delle applicazioni, utilizza sudo/login_as_user, invia il token risultante all'utente ed effettua chiamate API frontend con Cross-Origin Resource Sharing (CORS)
Solo frontend
Eseguire l'autenticazione con OAuth ed effettuare chiamate API frontend con CORS
Autenticazione e chiamata implicite dalle estensioni di Looker
Fai una prova
Vuoi vedere l'API in azione prima di scrivere il codice? Puoi esplorare gli endpoint API ed effettuare chiamate API di esempio alla tua istanza di Looker utilizzando Explorer API.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[],[],null,["# Looker API overview\n\n| **Note:** As of Looker 22.4, the [Looker API 4.0 is generally available](/looker/docs/api-4-ga). The API 3.1 is deprecated.\n\nLooker's API provides access to the vast majority of Looker functionality over a convenient JSON-oriented REST API. It includes a diversity of endpoints, from simple running of queries in a variety of formats, to managing users, content, schedules, instance configurations, and more.\n\nThe API can be used as a part of many use cases. Some examples include internal operational tools, highly custom customer-facing embedded analytics, mobile app integrations, specialized Looker administrative tools, and more.\n\nUsing the API\n-------------\n\nYou can use the API either directly via HTTPS requests or through the convenience of a language-specific SDK.\n\nIn addition, the API provides for a few authentication modes, which may help inform your architectural choices. Backend services can authenticate with API credentials, can use the API with a service account, and can conveniently impersonate API requests on behalf of end users. Alternatively, frontend clients can leverage [OAuth authentication (Authorization Code PKCE)](https://oauth.net/2/pkce/), without the need to handle sensitive client secrets.\n\nHere is a sample of the most common ways that the API is used end-to-end:\n\n- Backend only\n - Authenticate with [API credentials](/looker/docs/api-auth): Common for command-line scripts, administrative tasks, or sandbox environments\n- Frontend and backend\n - Provide an application server with single service account and credentials, and make API calls through the service account\n - Provide an application server with single service account and credentials, but use Looker's `sudo` or `login_as_user` functionality to make calls on behalf of the end user\n - Authenticate with an application server, use sudo/login_as_user, send the resulting token back to the user, and make frontend API calls with [Cross-Origin Resource Sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)\n- Frontend only\n - Authenticate with [OAuth](/looker/docs/api-cors), and make frontend API calls with CORS\n - Implicit authentication and invocation from within Looker extensions\n\nTry it out\n----------\n\nWant to see the API in action before writing any code? These demos can help:\n\n- [Atom Fashion](https://atomfashion.io/) is a demo data-driven web app (requires Google account to log in).\n- Explore API endpoints and make sample API calls against your Looker instance using the [API Explorer](/looker/docs/api-explorer)."]]