Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
L'API Looker permet d'accéder à la grande majorité des fonctionnalités de Looker via une API REST pratique orientée JSON. Elle comprend une variété de points de terminaison, allant de l'exécution de requêtes dans différents formats à la gestion des utilisateurs, du contenu, des plannings, des configurations d'instance, etc.
L'API peut être utilisée dans de nombreux cas d'utilisation. Voici quelques exemples : outils opérationnels internes, analyses intégrées très personnalisées destinées aux clients, intégrations d'applications mobiles, outils d'administration Looker spécialisés, etc.
Utiliser l'API
Vous pouvez utiliser l'API directement à l'aide de requêtes HTTPS ou grâce à la simplicité d'un SDK spécifique à une langue.
De plus, l'API propose quelques modes d'authentification, qui peuvent vous aider à faire vos choix architecturaux. Les services de backend peuvent s'authentifier avec des identifiants API, utiliser l'API avec un compte de service et emprunter facilement l'identité des utilisateurs finaux pour les requêtes API. Les clients frontend peuvent également utiliser l'authentification OAuth (Authorization Code PKCE) sans avoir à gérer les codes secrets client sensibles.
Voici un exemple des utilisations les plus courantes de l'API de bout en bout :
Backend uniquement
Authentification avec des identifiants API : courante pour les scripts de ligne de commande, les tâches administratives ou les environnements de bac à sable
Frontend et backend
Fournir un serveur d'application avec un seul compte de service et des identifiants, et effectuer des appels d'API via le compte de service
Fournissez un serveur d'application avec un seul compte de service et des identifiants, mais utilisez la fonctionnalité sudo ou login_as_user de Looker pour effectuer des appels au nom de l'utilisateur final.
S'authentifier auprès d'un serveur d'application, utiliser sudo/login_as_user, renvoyer le jeton obtenu à l'utilisateur et effectuer des appels d'API frontend avec Cross-Origin Resource Sharing (CORS)
Interface uniquement
S'authentifier avec OAuth et effectuer des appels d'API frontend avec CORS
Authentification et invocation implicites depuis les extensions Looker
Essayer
Vous souhaitez voir l'API en action avant d'écrire du code ? Vous pouvez explorer les points de terminaison de l'API et effectuer des appels API exemples sur votre instance Looker à l'aide de l'explorateur d'API.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 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)."]]