Choosing an Endpoints option

To have your API managed by Cloud Endpoints, you have three options depending on where your API is hosted and the type of communications protocol your API uses:

This page describes the Endpoints options to help you decide which one is right for you.

Choosing a computing option

Endpoints supports different Google Cloud Platform (GCP) computing options that can host your API's backend code. The following table summarizes the supported computing options:

Endpoints for OpenAPI Endpoints for gRPC Endpoints Frameworks
App Engine
standard environment
Java 8 and
Python 2.7 runtimes
App Engine
flexible environment
Compute Engine
Cloud Functions
Other non-GCP

For a comparison of the features provided by App Engine, GKE, and Compute Engine, see Choosing a computing option. If you are thinking of using App Engine, you need to choose either the standard or flexible environment. For a comparison of the two environments, see Choosing an App Engine environment.

About the computing option limitations

Endpoints for OpenAPI and Endpoints for gRPC use the Extensible Service Proxy (ESP) as an API gateway. Typically, ESP is deployed as a container in front of your application. After you deploy your API's backend code, ESP intercepts all requests and performs any necessary checks (such as authentication) before forwarding the request to the API backend. When the backend responds, ESP gathers and reports telemetry using Service Infrastructure. You can view metrics for your API and links to Stackdriver logs and traces on the Endpoints Services page in the GCP Console.

With some exceptions, Endpoints for OpenAPI and Endpoints for gRPC support any platform that the ESP container can be deployed to.

App Engine standard environment limitations

Your only Endpoints option for the App Engine standard environment is Endpoints Frameworks, and only the Java 8 and Python 2.7 runtime environments are supported. Endpoints doesn't provide a solution for the other language-specific runtimes on the App Engine standard environment.

Because the App Engine standard environment didn't support multi-container deployments when Endpoints Frameworks was under development, Endpoints Frameworks doesn't use ESP. Instead, Endpoints Frameworks includes a built-in API gateway that provides API management features that are comparable to the features that ESP provides for Endpoints for OpenAPI and Endpoints for gRPC.

gRPC APIs aren't supported on App Engine

gRPC is a remote procedure call (RPC) framework that can run on any environment. With gRPC, a client application can directly call methods in a server application on a different machine as if it were a local object. A core feature of gRPC is bi-directional streaming with HTTP/2-based transport.

Although the App Engine flexible environment supports multi-container deployments, App Engine doesn't support HTTP/2.

Cloud Functions isn't supported

With Cloud Functions, you write simple, single-purpose functions that are attached to events that happen within your cloud infrastructure and services. You bind a trigger to a function so that the function executes when an event is fired. Cloud Functions doesn't provide a way for you to insert ESP in front of your function.

Supported programming languages

  • The OpenAPI Specification is a language-agnostic specification. You can implement your API in any programming language.
  • gRPC provides the protocol buffer compiler, 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 for the most up-to-date list.
  • Endpoints Frameworks supports only Java 8 and Python 2.7.

Describing your API

The Endpoints options provide different ways to describe your API.

Endpoints for OpenAPI

The OpenAPI Initiative is an industry-wide effort to standardize the description of REST APIs. Endpoints supports APIs that are described using version 2.0 of the OpenAPI Specification (formerly the Swagger Specification). You describe the surface of your API in a JSON or YAML file (referred to as an OpenAPI document). You can implement your API using any publicly available REST framework such as Django or Jersey. If you are unfamiliar with the OpenAPI Specification, see OpenAPI overview.

For more information, see Endpoints for OpenAPI.

Endpoints for gRPC

With gRPC, you define the structure of the data that you want to serialize in a proto file: this is an ordinary text file with a .proto extension. You also define the surface of your API in proto files, with RPC method parameters and return types specified as protocol buffer messages. If you are unfamiliar with gRPC, see What is gRPC? in the gRPC documentation.

For more information, see Endpoints for gRPC.

Endpoints Frameworks

Endpoints Frameworks is a web framework for the App Engine standard Python 2.7 and Java 8 runtime environments. You add metadata (using annotations in Java or decorators in Python) to your source code. The metadata describes the surface of the REST APIs for your application.

For more information, see Endpoints Frameworks.

What's next

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Endpoints
Need help? Visit our support page.