Example implementations of the Google Cloud Endpoints API Managment service. Cloud Endpoints offers the possibility to implement and API service with three communications protocols: OpenAPI, gRPC and Endpoints Frameworks.
This repository implements all of the environments where the Cloud Endpoints APIs can run, except for pure Kubernetes environments, as these were done already in GKE.
Status of the Cloud Endpoints runtimes at the state of the creation of this repository (March 2019):
Environment | OpenAPI | gRPC | Endpoints Frameworks |
---|---|---|---|
Kubernetes | ✔️ | ✔️ | ❌ |
Compute Engine | ✔️ | ✔️ | ❌ |
App Engine Flex | ✔️ | ❌ | ❌ |
App Engine Standard | ❌ | ❌ | ✔️ |
All the APIs, despite running in different environments/frameworks, are designed with the same baseline logic:
- All APIs are written in Python
- All APIs communicate to Datastore in the backend, to perform the API logic/operations. All the environments use the Datastore Cloud Client Libraries, except for Endpoints Frameworks, which uses the Python NDB Client Library.
The APIs have the following method/handler:
- Request parameters: None
- Authentication required: API Key
- Limits: None
- Response: List of users
- Request parameters:
- user: Required - in path
- age: Optional - in body
- Authentication required: API Key
- Limits: 5 requests/min
- Response: User entity properties
- Request parameters:
- user: Required - in path
- age: Optional - in body
- Authentication required (both are required!):
- API Key
- JWT Token
- Limits: None
- Response: Status (OK/ERROR)
- Request parameters:
- user: Required - in path
- Authentication required: API Key
- Limits: None
- Response: Status (OK/ERROR)
-
base: The base code for the three API implementations. It includes the following:
-
openapi-flask-application: The base API code for OpenAPI implementations. Based in Flask and Flask-RESTful.
-
openapi-docker-application: The same previous API code, but with an additional script to Dockerize it.
-
grpc-application: Base code for gRPC based APIs.
-
endpoints-frameworks: Base code for the Endpoints Frameworks implementation.
-
auth-methods: Code to create the credentials/tokens in order to authenticate into some of the API handlers.
-
-
endpoints-frameworks: Implementation of the Endpoints Frameworks App Engine framework, in App Engine Standard using the Python runtime.
-
gRPC-compute-engine: Implementation of the gRPC framework API in Compute Engine.
-
gRPC-kubernetes: Implementation of the gRPC framework API in Google Kubernetes Engine (GKE).
-
openapi-app-engine-flexible: Implementation of the OpenAPI management system in App Engine Flexible, the Python runtime.
-
openapi-compute-engine: Implementation of the OpenAPI management system in Compute Engine.
-
openapi-kubernetes: Implementation of the OpenAPI management system in Google Kubernetes Engine (GKE).