Looker 會在要求的 HTTP 授權標頭中使用 OAuth 2.0 載具存取權憑證,驗證 API 要求。所有 Looker API 端點都需要安全的 HTTPS 連線,才能確保存取權杖在傳輸過程中安全無虞。
這項操作的步驟取決於您是否使用 SDK。如需詳細操作說明,請參閱 Looker API 驗證說明文件頁面。
互動式 API 說明文件
如需 API 參考資料說明文件,請前往 Looker Marketplace 下載 API Explorer 擴充功能。詳情請參閱「使用 API Explorer」說明文件。如果您是 Looker 管理員,也可以在 Looker 的 API 管理員頁面中,按一下「Use API Explorer」連結,存取 API Explorer。
版本管理
建構應用程式時,API 穩定性是一項重要考量。為協助您瞭解哪些端點日後可能會變更,哪些端點應保持穩定,我們會將特定端點標示為 Beta 版。詳情請參閱 Looker API 版本控制說明文件頁面。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-05 (世界標準時間)。"],[],[],null,["# Getting started with the Looker API\n\n| **Note:** As of Looker 22.4, the [Looker API 4.0 is generally available](/looker/docs/api-4-ga). In Looker 23.18, the [Looker API 3.1 has been removed](/looker/docs/api-3x-deprecation).\n\nThe Looker API is a secure, \"RESTful\" application programming interface for managing your Looker instance and fetching data through the Looker data platform. With the Looker API, you can write applications or automation scripts to provision new Looker user accounts, run queries, schedule data deliveries, etc. Just about anything you can do in the Looker application you can do via the Looker API.\n\nLooker API path and port\n------------------------\n\nAccess your Looker instance's API through its API URL.\n\nYour Looker admin can specify an API path by entering it in the [**API Host URL**](/looker/docs/admin-panel-platform-api#api_host_url) field on the **Admin \\\u003e API** page in the following format: \n\n https://\u003cinstance_name\u003e.cloud.looker.com\n\nYour Looker admin may also use the [**API Host URL**](/looker/docs/admin-panel-platform-api#api_host_url) field to assign an API path that is different from your Looker server machine name. This is common when your Looker installation is behind a load balancer, for example. In this case, contact your Looker admin for your API path.\n\nIf your Looker admin has not specified the **API Host URL** field, Looker uses the default API path. For Looker instances hosted on Google Cloud, Microsoft Azure, and instances hosted on Amazon Web Service (AWS) that were created on or after 07/07/2020, the default Looker API path uses port `443`. For Looker instances hosted on AWS that were created before 07/07/2020, the default Looker API path uses port `19999`. The default API URL is in the following format: \n\n https://\u003cinstance_name\u003e.cloud.looker.com:\u003cport\u003e\n\nClient SDKs\n-----------\n\nYou can use the Looker API with any programming language or application environment that can make HTTPS requests and process JSON responses. You can construct Looker API HTTPS requests manually by using curl (or equivalent), by using the Looker Ruby SDK, or by generating a client SDK library for your language of choice. We recommend using an SDK because it takes care of the details of authentication and HTTPS requests for you, so that you can call the Looker API using simple function calls.\n\nYou'll find SDK details on our [Looker API SDKs](/looker/docs/api-sdk) documentation page.\n\nAuthentication\n--------------\n\nLooker authenticates API requests by using an OAuth 2.0 bearer access token in the HTTP authorization header of the request. All Looker API endpoints require a secure HTTPS connection so that the access token will be secure in transit.\n\nThe steps for achieving this depend upon whether or not you are using an SDK. Detailed instructions can be found on our [Looker API authentication](/looker/docs/api-auth) documentation page.\n\nInteractive API documentation\n-----------------------------\n\nFor API reference documentation, the API Explorer extension is available from the [Looker Marketplace](/looker/docs/marketplace). For more information, see the [Using the API Explorer](/looker/docs/api-explorer) documentation page. If you are a Looker admin, you can also access the API Explorer by clicking the **Use API Explorer** link on Looker's [**API** Admin page](/looker/docs/admin-panel-platform-api).\n\nVersioning\n----------\n\nAPI stability is an important consideration when building applications. In order to help you understand which endpoints may be changed in the future, and which should remain stable, we mark certain endpoints as being in beta. For more details, see the [Looker API versioning](/looker/docs/api-versioning) documentation page."]]