Let's move on to the API design. It is important to design consistent APIs for services. Google provides an API design guide with recommendations on items such as names, error handling documentation, versioning, and compatibility. This guide and the API style book are linked in the slides. For examples of best practices, it is useful to examine the Google Cloud APIs. Each Google Cloud service exposes a REST API. Functions are defined in the form service.collection.verb. The service represents the service endpoint. Example, for the Compute Engine API, the service endpoint is compute.googleapis.com. Collections include instances, instanceGroups, and instanceTemplates. The verbs then include list, GET, and insert, for example. To see all your Compute Engine instances, make a GET request to the link shown on the slide. Parameters are passed either in the URL or on the request body in JSON format. OpenAPI is an industry standard for exposing APIs to clients. Version 2.0 of the specification was known as Swagger. Swagger is now a set of open-source tools built around OpenAPI that with associated tool link supports designing, building, consuming, and documenting APIs. OpenAPI supports an API first approach. Designing the API through OpenAPI can provide a single source of truth from which source code for client libraries and server stubs can be generated automatically, as well as API user documentation. OpenAPI is supported by Cloud Endpoints and Apigee. The example document shows a sample of an OpenAPI specification of a pet store service. The URI is petstore.swagger.io/v1. Note the version in the URI here. The example then shows an endpoint/pets, which is accessed using the HTTP verb GET, and will provide a list of all pets. Developed at Google, gRPC is a binary protocol that is extremely useful for internal microservice communication. It provides support for many programming languages, has strong support for loose coupling via contracts defined using protocol buffers, and is high-performing because it's a binary protocol. It is based on HTTP/2 and supports both client and server streaming. The protocol is supported by many Google Cloud services, such as the global load balancer and Cloud Endpoints for microservices, as well as on GKE by using an Envoy Proxy. Google Cloud provides two tools for managing APIs, Cloud Endpoints and Apigee. Cloud Endpoints is an API management gateway which helps you develop, deploy, and manage APIs on any Google Cloud backend. It runs on Google Cloud and leverages a lot of Google's underlying infrastructure. Apigee is an API management platform built for enterprises with deployment options on Cloud, on-premises, or hybrid. The feature set includes an API gateway, customizable portal for on-boarding partners and developers, monetization, and deep analytics around APIs. You can use Apigee for any HTTP, HTTPS backends, no matter where they are running on-premises, any public Cloud, etc. Both solutions provide tools for services such as user authentication, monitoring, and securing, and also for OpenAPI and gRPC.