If your APIs are too messy, clap your hands: Google beats drum for Registry API

If your APIs are too messy, clap your hands: Google beats drum for Registry API

In a bid to help teams stay on top of their APIs, Google has come up with a Registry API to organise API information. An APLv2-licensed reference implementation in the form of a still experimental gRPC service is now available on GitHub, as its creators are looking for a bit of feedback on the project.

Since the “build it and they will come” approach doesn’t seem to have been working for the implementation that was first publicly shared in October 2020, Apigee Tech Lead Tim Burks has now taken to Google’s Open Source blog to spread the word about the project. 

The idea itself sounds quite helpful as the Registry API “allows teams to upload and share machine-readable descriptions of APIs that are in use and in development”. 

Used as a sort of API catalogue that can be incorporated into centrally accessible online portals or directories, the Registry API could help reduce the duplication of work, giving teams a better idea of what’s already available in their organisation.

The fact that descriptions are meant to include API specifications in widely known formats – think OpenAPI and the Protocol Buffers (protobuf) language – also suggests that these specs can easily be used by linters, documentation and code generators, test runners and other tools, which is another plus. 

Developers interested in the formal description of the Registry API can take a look at some source files written in Google’s own protobuf language available in the project’s repository. Its stability is currently marked as alpha, though API management company Apigee aims to “make it a stable base for API lifecycle applications,” which might be interesting to those banking on Google for the long haul.

Apigee’s reference implementation is a gRPC service, which was written in Go and can be either deployed in a container for global accessibility or run locally. To build it, teams will need to have Go 1.13 or later, version 3.10 of the Protocol Buffer Compiler, and “make, git, and other elements of common unix build environments” installed. Data is stored using a relational interface layer currently supporting PostgreSQL and SQLite, or Google’s Cloud Datastore API.

The reference service includes capabilities for transcoding from gRPC to JSON for automatically publishing JSON REST APIs via a proxy, and configuration to support generated API clients. Two command-line interfaces are also part of the repository and can be used for various API management tasks.

Though it isn’t an official Google product yet, the project was sparked at one of the Google Cloud companies, so don’t be surprised if documentation is slightly better for scenarios using its resources as opposed to local or private cloud setups.