HTTP REST APIs
URL
Example
The following sections present a few real world examples on how to apply resource-oriented API design to large scale services. You can find more examples in the Google APIs repository.
In these examples, the asterisk indicates one specific resource out of the list.
Gmail API
The Gmail API service implements the Gmail API and exposes most of Gmail functionality. It has the following resource model:
Cloud Pub/Sub API
The pubsub.googleapis.com
service implements the Cloud Pub/Sub API, which defines the following resource model:
NOTE: Other implementations of the Pub/Sub API may choose different resource naming schemes.
Cloud Spanner API
The spanner.googleapis.com
service implements the Cloud Spanner API, which defines the following resource model:
- API service:
spanner.googleapis.com
- A collection of instances:
projects/*/instances/*
.
- A collection of instance operations:
projects/*/instances/*/operations/*
.
- A collection of databases:
projects/*/instances/*/databases/*
.
- A collection of database operations:
projects/*/instances/*/databases/*/operations/*
.
- A collection of database sessions:
projects/*/instances/*/databases/*/sessions/*
.
...