This lab walks you through Cloud Endpoints.
Duration: 60 minutes
App Engine is a platform where Cloud Endpoints enabled apps can be hosted. Cloud Endpoints provides frameworks that enable you to write RESTful APIs, with features of managing your APIs.
Using services like Cloud Run, Cloud Functions and App Engine, it is very easy and quick to create APIs. However, Security, Monitoring, Publishing APIs is a major challenge.
Cloud Endpoints is an API management system that provides an API console, hosting, logging, monitoring features to help you to create, share, maintain and secure APIs.
Cloud Endpoints is just a middle man between the client (consumer) of your API services. REST is just a convention using HTTP verbs for communicating.
Endpoints allow you to expose a clear interface whereas the underlying implementation can be a mess. You define endpoints and route queries to different implementations: Functions, VM, Cloud Run, App Engine, and even on another cloud!
Endpoints can be authenticated (especially API keys).
When you write your API, each endpoint maps to a backend function. Inside that function, you can mention your business logic, but typically it will be either:?
Deserialise your posted JSON, validate it, and write some entities to Database.
Reading data from Database and serialize them to JSON and return them to the client.
Just like organizations need services management for microservices, they need API management for their APIs, that's where Cloud Endpoint comes into the picture.
Endpoints are independent of languages. You can build the API in any language and REST framework that supports API description using an OpenAPI configuration file.
The process to use Endpoints for OpenAPI, you:
Configuring Endpoints: You describe the API surface and configure Endpoints features, such as API keys or authentication rules, in an OpenAPI configuration file.
Deploying the Endpoints configuration: After you define your API in an OpenAPI configuration file, you use the Cloud SDK to deploy it to Service Management, which Endpoints use to manage your API. Now Endpoints knows all about your API and how to secure it.
Deploying the API Backend: You deploy ESP or ESPv2 and your API backend to a supported Google Cloud backend, such as App Engine. ESP maps with Endpoint's backend services to secure and monitor your API at runtime.
Downloading an Application containing Endpoints.
Deploying the Application on App Engine.
Testing the Output.