BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Organizing Information about APIs with Google Registry API

Organizing Information about APIs with Google Registry API

This item in japanese

Bookmarks

Google Registry API aims to allow developers to organize information about APIs by uploading and sharing machine-readable descriptions of the APIs they use in development.

The Registry API is a gRPC service that is formally described by Protocol Buffers and that closely follows the Google API Design Guidelines at aip.dev. The Registry API description is annotated to support gRPC HTTP/JSON transcoding, which allows it to be automatically published as a JSON REST API using a proxy.

APIs are described using a variety of formats, including OpenAPI, the Google API Discovery Service Format, and Protocol Buffers. The Registry API itself is described in the Protocol Buffers language. This is how you can get a list of all APIs registered with your server and belonging to a given project and all versions available for a given API:

curl "https://<registry-api-server>/v1alpha1/projects/<prj>/apis"
curl "https://<registry-api-server>/v1alpha1/projects/<prj>/apis/<api>/versions"

Besides projects, apis, and versions, other high-level entities managed by the Registry API are specs, which correspond to documents describing API versions in a structured way; properties, which are named values that can be associated to projects, apis, and versions; and labels, which are similar to properties but do not have values.

Google has made available a reference implementation of the Registry API for development teams to deploy and run it. Written in Go, the Registry API server can be deployed either locally or with Google Cloud Run using the provided Docker image. In both cases, the server uses Cloud Datastore API, a remote NoSQL database service, by default. You can however configure it to use a relational database using the -c option when starting registry-server and passing a YAML file containing the storage backend configuration. Currently, the repository includes configuration files for PostgreSQL and SQLite.

You build the Registry API reference implementation using make all, which also downloads all required dependencies, with the exception of the Go compiler and the Protocol Buffer compiler. This will generate a Go client library and a command-line interface to make it easier to work with the API.

Currently, the Registry API as well as its reference implementation are considered as "alpha" and are still subject to changes.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT