Endpoints 与语言无关。您可以使用 OpenAPI 配置文件以任何支持 API 说明的语言和 REST 框架构建 API。
要使用适用于 OpenAPI 的 Endpoints,请执行以下操作:
配置 Endpoints:在 OpenAPI 配置文件中描述 API 表面并配置 Endpoints 功能(例如 API 密钥或身份验证规则)。
部署 Endpoints 配置:在 OpenAPI 配置文件中定义了 API 后,使用 Google Cloud CLI 将其部署到 Service Management,然后 Endpoints 会使用 Service Management 来管理您的 API。现在,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,而身份验证流程则可确定哪个用户正在使用该应用。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-19。"],[[["\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)."]]