Skip to main content

REST

Recommendation
Updated
Moved
USE
2021-09-15

What it is

Representational state transfer (REST) is a software architectural style used to communicate between our service API:s and user interfaces. A REST API will describe its system-specific model as a set of resources and expose an interface for reading and modifying their state.

When to use it

We have opted to communicate using HTTP/1 with REST over HTTP/2 (comparison) with gRPC for all of our web applications. gRPC can be translated to REST using AIP resource conventions to transcode gRPC into HTTP. To communicate with an API from a web application, refer to its protobuf definitions to understand its REST interface. Then generate a TypeScript HTTP client for that service using protoc-gen-typescript-http.

How to learn it

Learn about REST principles and how we structure our gRPC API:s using Google AIP. Refer to protoc-gen-typescript-http for guidelines on how to generate a TypeScript HTTP Client.