Endpoints 與程式設計語言種類無關。您可以用任何程式設計語言,以及支援使用 OpenAPI 設定檔說明 API 的 REST 架構來建構您的 API。
如要使用 OpenAPI 專用的 Endpoints,您必須進行下列操作:
設定 Endpoints:您必須在 OpenAPI 設定檔中說明 API 的介面及設定 Endpoints 功能,例如 API 金鑰或驗證規則。
部署 Endpoints 設定:在 OpenAPI 設定檔中定義 API 後,您必須使用 Google Cloud CLI 將 API 部署至 Endpoints 用來管理 API 的服務:Service Management。這樣 Endpoints 就會瞭解您的 API 所有資訊,並知道如何確保其安全。
部署 API 後端:您必須將 ESP 或 ESPv2 和 API 後端部署至支援的 Google Cloud 後端,例如 Compute Engine。ESP 會在執行階段與 Endpoints 後端服務共同保護及監控 API。
控管 API 存取權
Endpoints 可讓您將 API 設定為任何呼叫都需要 API 金鑰,並驗證 API 金鑰。您也可以使用 Google Cloud 控制台與其他開發人員共用您的 API,讓他們可以啟用您的 API 並產生 API 金鑰來呼叫該 API。
驗證 API 使用者
對於大多數 API 呼叫,每個呼叫的另一端都有一位使用者。雖然 API 金鑰可以指出哪個應用程式正在呼叫您的 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-04 (世界標準時間)。"],[[["\u003cp\u003eEndpoints is a distributed API management system that offers an API console, hosting, logging, monitoring, and security features for creating, sharing, and maintaining APIs.\u003c/p\u003e\n"],["\u003cp\u003eEndpoints supports both the Extensible Service Proxy (ESP) and the Extensible Service Proxy V2 (ESPv2), offering compatibility with various platforms like Google Kubernetes Engine, Compute Engine, and Cloud Run.\u003c/p\u003e\n"],["\u003cp\u003eEndpoints provides API management features including logs, metrics, API hosting in Docker container environments, and language-independent REST API development through OpenAPI configuration files.\u003c/p\u003e\n"],["\u003cp\u003eUsing Endpoints for OpenAPI requires configuring the API surface and features in an OpenAPI file, deploying the configuration to Service Management, and deploying ESP/ESPv2 with the API backend to a supported platform.\u003c/p\u003e\n"],["\u003cp\u003eEndpoints allows controlling API access with API keys and authenticating API users to determine who is using the app, while the API server decides what the user can do.\u003c/p\u003e\n"]]],[],null,["# About Cloud Endpoints\n\nOpenAPI \\| [gRPC](/endpoints/docs/grpc/about-cloud-endpoints \"View this page for the Cloud Endpoints gRPC docs\")\n\n\u003cbr /\u003e\n\nEndpoints is a distributed API management system. It provides an\nAPI console, hosting, logging, monitoring, and other features to help you\ncreate, share, maintain, and secure your APIs.\n\nThis page provides an overview of\n[Cloud Endpoints for OpenAPI](/endpoints/docs/openapi/openapi-overview).\n\n\nFor information on other types of API frameworks supported by\nEndpoints, see\n[All Endpoints docs](/endpoints/docs).\n\nEndpoints is available for use with the distributed Extensible Service Proxy (ESP) or the Extensible Service Proxy V2 (ESPv2). Each proxy provides support to the platforms described below:\n\n- App Engine flexible (ESP only)\n- Google Kubernetes Engine (ESP or ESPv2)\n- Compute Engine (ESP or ESPv2)\n- Kubernetes (ESP or ESPv2)\n- App Engine standard (ESPv2 only)\n- Cloud Run functions (ESPv2 only)\n- Cloud Run (ESPv2 only)\n- Knative serving (ESPv2 only)\n\n| **Warning:** ESP is maintained for preexisting users. New users are encouraged to follow the tutorials for ESPv2. Both products are generally available and production-ready.\n\nEndpoints with ESP\n------------------\n\nEndpoints uses the distributed Extensible Service Proxy (ESP)\nto provide low latency and high performance for serving even the most demanding\nAPIs. ESP is a service proxy based on\n[NGINX](https://www.nginx.com/resources/wiki/), so you can be confident that it\nscales as needed to handle simultaneous requests to your API. ESP\nruns in its own Docker container for better isolation and scalability and is\ndistributed in the Container Registry. You can use it\nwith:\n\n- [App Engine flexible environment](/endpoints/docs/openapi/get-started-app-engine)\n- [Compute Engine](/endpoints/docs/openapi/get-started-compute-engine-docker)\n- [Google Kubernetes Engine](/endpoints/docs/openapi/get-started-kubernetes-engine)\n- [Kubernetes](/endpoints/docs/openapi/get-started-kubernetes)\n\nEndpoints with ESPv2\n--------------------\n\nESPv2 is an [Envoy](https://www.envoyproxy.io/docs/envoy/latest/)-based\nhigh-performance, scalable proxy that runs in front of an OpenAPI or gRPC API backend.\nESPv2 supports version 2 of the\n[OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md) and gRPC Specifications. You can use it\nwith:\n\n- [App Engine standard environment](/endpoints/docs/openapi/set-up-app-engine-standard-environment-espv2)\n- [Compute Engine](/endpoints/docs/openapi/get-started-compute-engine-docker-espv2)\n- [Google Kubernetes Engine](/endpoints/docs/openapi/get-started-kubernetes-engine-espv2)\n- [Kubernetes](/endpoints/docs/openapi/get-started-kubernetes-espv2)\n- [Cloud Run](/endpoints/docs/openapi/set-up-cloud-run-espv2)\n- [Knative serving](/endpoints/docs/openapi/set-up-cloud-run-anthos-espv2)\n- [Cloud Run functions](/endpoints/docs/openapi/set-up-cloud-functions-espv2)\n\nEndpoints API management features\n---------------------------------\n\nWhether you use Endpoints with ESP or ESPv2, it provides a number of significant API management features to enable you to develop, monitor, and control access to your APIs.\n\n### Logs and metrics\n\nEndpoints uses\n[Service Infrastructure](/service-infrastructure/docs/overview)\nto manage APIs and report logs and metrics. Most\n[Google Cloud APIs](/apis/docs/overview)\nuse this same infrastructure. You can manage and monitor your APIs on the\n**Endpoints Services** page in the [Google Cloud console](https://console.cloud.google.com/endpoints).\n\n### API hosting\n\nEndpoints is optimized for the Docker container environment. You\ncan host your API anywhere Docker is supported so long as it has internet access to\nGoogle Cloud.\n\n### Developing a REST API with Endpoints for OpenAPI\n\nEndpoints is language independent. You build your API in any\nlanguage and REST framework that supports API description using an\n[OpenAPI configuration file](/endpoints/docs/openapi/openapi-overview).\n\nTo use Endpoints for OpenAPI, you:\n\n- **Configure Endpoints** : You describe the API\n [surface](/endpoints/docs/openapi/glossary#surface)\n and configure Endpoints features, such as API keys or\n authentication rules, in an OpenAPI configuration file.\n\n- **Deploy the Endpoints configuration**: After you define your\n API in an OpenAPI configuration file, you use the Google Cloud CLI to deploy it\n to Service Management, which Endpoints uses to manage your\n API. Now Endpoints knows all about your API and how to secure\n it.\n\n- **Deploy the API Backend**: You deploy ESP or ESPv2 and your API\n backend to a supported Google Cloud backend, such as Compute Engine.\n ESP coordinates with Endpoints backend\n services to secure and monitor your API at runtime.\n\n### Controlling API access\n\nEndpoints lets you configure your API to require an API key for\nany call and validates the API key. You can also use the Google Cloud console to\n[share your API](/endpoints/docs/sharing-an-api) with other developers so they\ncan enable your API and generate API keys to call it.\n\n### Authenticating API users\n\nFor most API calls, there is a user on the other end of each call. While\n[API keys](/endpoints/docs/restricting-api-access-with-api-keys)\nindicate which app is making a call to your API, the\n[authentication](/endpoints/docs/openapi/authentication-method)\nprocess determines which user is using that app.\n\nNote that your API server still needs to decide what the authenticated user\ncan do with your API. For more information, see the\n[Google Cloud Auth guide](/docs/authentication).\n\nWhat's next\n-----------\n\n- Get familiar with the deployment steps and see Endpoints\n features in action by doing the\n [Quickstart for Endpoints](/endpoints/docs/deploy-api),\n which uses scripts to deploy a sample API to a App Engine flexible\n backend.\n\n- Learn more about using Endpoints by walking through one of the\n [Tutorials](/endpoints/docs/openapi/tutorials)."]]