[[["易于理解","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\u003eCloud Endpoints offers three options for API management: Cloud Endpoints for OpenAPI, Cloud Endpoints for gRPC, and Cloud Endpoints Frameworks for the App Engine standard environment.\u003c/p\u003e\n"],["\u003cp\u003eEndpoints supports various Google Cloud computing options, including App Engine, Cloud Run, Compute Engine, GKE, and Kubernetes, utilizing either the Extensible Service Proxy (ESP) or Extensible Service Proxy V2 (ESPv2) for API management.\u003c/p\u003e\n"],["\u003cp\u003eEndpoints Frameworks is specifically designed for the App Engine standard generation 1 environment, supporting Java 8 and Python 2.7, and using a built-in API gateway instead of ESP due to historical limitations.\u003c/p\u003e\n"],["\u003cp\u003egRPC APIs, known for their bi-directional streaming over HTTP/2, are not supported on App Engine or Cloud Run functions due to the lack of HTTP/2 support in these environments.\u003c/p\u003e\n"],["\u003cp\u003eThe different Endpoints options provide distinct ways to describe APIs: OpenAPI uses JSON or YAML files, gRPC utilizes proto files, and Endpoints Frameworks employs metadata within the source code.\u003c/p\u003e\n"]]],[],null,["# Choosing an Endpoints option\n\nTo have your API managed by Cloud Endpoints, you have three options depending\non where your API is hosted and the type of communications protocol your\nAPI uses:\n\n- [Cloud Endpoints for OpenAPI](/endpoints/docs/openapi)\n- [Cloud Endpoints for gRPC](/endpoints/docs/grpc/about-grpc)\n- [Cloud Endpoints Frameworks for the App Engine standard environment](/endpoints/docs/frameworks/about-cloud-endpoints-frameworks)\n\nThis page describes the Endpoints options to help you decide\nwhich one is right for you.\n\nChoosing a computing option\n---------------------------\n\nEndpoints supports different Google Cloud\ncomputing options that can host your API's backend code. Endpoints works with either the\n[Extensible Service Proxy (ESP)](/endpoints/docs/grpc/glossary#extensible_service_proxy) or the [Extensible Service Proxy V2](/endpoints/docs/openapi/glossary#extensible_service_proxy_v2) (ESPv2) to provide API management. The following table\nsummarizes the supported computing options:\n\nFor a comparison of the features provided by App Engine,\nGKE, and Compute Engine, see\n[Choosing a computing option](/docs/choosing-a-compute-option).\nIf you are thinking of using App Engine, you need to choose either the\nstandard or flexible environment. For a comparison of the two environments, see\n[Choosing an App Engine environment](/appengine/docs/the-appengine-environments).\n\nAbout the computing option limitations\n--------------------------------------\n\nEndpoints for OpenAPI and Endpoints for gRPC can use\nESP or ESPv2 as a proxy.\nFor non-serverless platforms, ESP or ESPv2 is deployed as a container in front of your\napplication or as a sidecar with your application. For serverless platforms, such as Cloud Run, Cloud Run functions, and App Engine, ESPv2 is deployed as a Cloud Run service as a remote proxy to manage your serverless platform applications.\n\nAfter you deploy your API's\nbackend code, ESP or ESPv2 intercepts all requests and performs any\nnecessary checks (such as authentication) before forwarding the request to the\nAPI backend. When the backend responds, ESP gathers and reports\ntelemetry using [Service Infrastructure](/service-infrastructure/docs/overview).\n\nYou can view metrics for your API and links to\n[Google Cloud Observability](/stackdriver/docs)\nlogs and traces on the **Endpoints Services** page in the\nGoogle Cloud console.\n\n### App Engine standard generation 1 environment limitations\n\nEndpoints for the App Engine standard generation 1 environment historically used Endpoints Frameworks, which\nonly supports the [Java 8 and Python 2.7 runtime environments](/appengine/docs/standard/runtimes).\n\n\nBecause the App Engine standard environment didn't support\nmulti-container deployments when Endpoints Frameworks was\nunder development, Endpoints Frameworks doesn't use\nESP. Instead, Endpoints Frameworks includes a built-in\n[API gateway](https://wikipedia.org/wiki/API_management)\nthat provides API management features that are comparable to the\nfeatures that ESP provides for Endpoints for OpenAPI and\nEndpoints for gRPC.\n\n\u003cbr /\u003e\n\n| **Note:** Although Endpoints Frameworks does work with the Java 7 runtime on App Engine standard environment, the [Java 7 runtime was deprecated](/appengine/docs/deprecations/java7) and is scheduled to be shutdown.\n\n### gRPC APIs aren't supported on App Engine or Cloud Run functions\n\n[gRPC](https://grpc.io/about/)\nis a remote procedure call (RPC) framework that\ncan run on any environment. With gRPC, a client application can directly call\nmethods in a server application on a different machine as if it were a local\nobject. A core feature of gRPC is bi-directional streaming with\n[HTTP/2-based transport](https://wikipedia.org/wiki/HTTP/2).\n\nApp Engine and Cloud Run functions do not support HTTP/2.\n\nSupported programming languages\n-------------------------------\n\n- The [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification) is a language-agnostic specification. You can implement your API in any programming language.\n- gRPC provides the [protocol buffer compiler](https://developers.google.com/protocol-buffers/docs/overview), `protoc`, for many major programming languages: C++, C#, Objective-C (for iOS), Dart, Go, Java (including support for Android), Node.js, Python, and Ruby. See the [gRPC FAQ](https://grpc.io/faq/) for the most up-to-date list.\n- Endpoints Frameworks supports only Java 8 and Python 2.7.\n\nDescribing your API\n-------------------\n\nThe Endpoints options provide different ways to describe your API.\n\n### Endpoints for OpenAPI\n\nThe\n[OpenAPI Initiative](http://openapis.org/)\nis an industry-wide effort to standardize the description of REST APIs.\nEndpoints supports APIs that are described using version 2.0 of\nthe OpenAPI Specification (formerly the\n[Swagger Specification](https://swagger.io/docs/specification/about/)).\nYou describe the\n[surface](/endpoints/docs/openapi/glossary#surface)\nof your API in a JSON or YAML file (referred to as an OpenAPI document). You can\nimplement your API using any publicly available REST framework such as\n[Django](https://www.djangoproject.com/)\nor\n[Jersey](https://jersey.github.io/).\nIf you are unfamiliar with the OpenAPI Specification, see\n[OpenAPI overview](/endpoints/docs/openapi/openapi-overview).\n\nFor more information, see [Endpoints for OpenAPI](/endpoints/docs/openapi).\n\n### Endpoints for gRPC\n\nWith gRPC, you define the structure of the data that you want to serialize in a\n*proto file* : this is an ordinary text file with a `.proto` extension. You also\ndefine the\n[surface](/endpoints/docs/grpc/glossary#surface)\nof your API in proto files, with RPC method parameters and return types\nspecified as protocol buffer messages. If you are unfamiliar with gRPC, see\n[What is gRPC?](https://grpc.io/docs/guides/)\nin the gRPC documentation.\n\nFor more information, see [Endpoints for gRPC](/endpoints/docs/grpc/about-grpc).\n\n### Endpoints Frameworks\n\nEndpoints Frameworks is a\n[web framework](https://wikipedia.org/wiki/Web_framework)\nfor the App Engine standard Python 2.7 and Java 8 runtime environments.\nYou add metadata (using annotations in Java or decorators in Python) to your\nsource code. The metadata describes the\n[surface](/endpoints/docs/frameworks/glossary#surface)\nof the REST APIs for your application.\n\nFor more information, see [Endpoints Frameworks](/endpoints/docs/frameworks/about-cloud-endpoints-frameworks).\n\nWhat's next\n-----------\n\n- See Endpoints features in action by doing the\n [Quickstart for Endpoints](/endpoints/docs/deploy-api),\n which uses scripts to deploy a sample API to the App Engine flexible\n environment.\n\n- Get familiar with the deployments steps by doing one of the tutorials for\n the Endpoints option that you have chosen:\n\n - [Endpoints for OpenAPI: Tutorials](/endpoints/docs/openapi/tutorials)\n - [Endpoints for gRPC: Tutorials](/endpoints/docs/grpc/tutorials)\n - [Endpoints Frameworks: Tutorials](/endpoints/docs/frameworks/tutorials)\n- Learn more about Endpoints and ESP:\n\n - [Endpoints for OpenAPI: About Endpoints](/endpoints/docs/openapi/about-cloud-endpoints)\n - [Endpoints for gRPC: About Endpoints](/endpoints/docs/grpc/about-cloud-endpoints)\n - [Comparing Extensible Service Proxy and Endpoints Frameworks](/endpoints/docs/frameworks/frameworks-extensible-service-proxy)"]]