Skip to content

Latest commit

 

History

History
96 lines (60 loc) · 4.99 KB

README.md

File metadata and controls

96 lines (60 loc) · 4.99 KB

Google Cloud Endpoints

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 ✔️

API baseline structure

All the APIs, despite running in different environments/frameworks, are designed with the same baseline logic:

  1. All APIs are written in Python
  2. 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.

API structure overview

The APIs have the following method/handler:

GET /users
  • Request parameters: None
  • Authentication required: API Key
  • Limits: None
  • Response: List of users
GET /users/{user}
  • Request parameters:
    • user: Required - in path
    • age: Optional - in body
  • Authentication required: API Key
  • Limits: 5 requests/min
  • Response: User entity properties
PUT /users/{user}
  • 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)
DELETE /users/{user}
  • Request parameters:
    • user: Required - in path
  • Authentication required: API Key
  • Limits: None
  • Response: Status (OK/ERROR)

Repository Structure