Our schemas are maintained in .proto files, which are compiled to various launguages (e.g. Python, JavaScript, Go) to enable type-safe access to model objects and request/response bodies.
Users and applications can make calls to Release 3 APIs over standard HTTP endpoints using JSON (via Connect) or through a gRPC client.
We publish our schemas to the Buf Schema Registry, where you can explore types and generate typed clients for a variety of languages.
Generated clients improve developer ergonomics and can improve performance with efficient protobuf serialization.
Protocol Buffers (protobuf) are a language-neutral, platform-neutral mechanism for serializing structured data.
They are smaller and faster than JSON while generating native language bindings from a simple schema definition (.proto files).
We chose Protocol Buffers for our Release 3 APIs because they deliver compact binary storage and fast parsing for high-volume data, strong schema evolution, and type-safe generated code across multiple languages.
Release 3 APIs use RPC-oriented services instead of REST resource URLs.
API calls are handled by Connect, which is a library for building web-friendly and gRPC-compatible HTTP APIs. Clients invoke well-defined requests (e.g. ListOrganizations) using plain HTTP POST methods with JSON payloads.
Some basic principles of RPC are:
Services are groups of RPC methods (for example OrganizationService with ListOrganizations) declared in .proto files.
Requests and responses are Protocol Buffer messages, or strongly typed schemas, as opposed to unstructured JSON payloads.
A typical operation is stateless per call. Each request carries what it needs, though streaming may be available for specific methods.
To make a request, you need to know the service and RPC method you want to call.
For example, to list all organizations, you would use the POST method and the URL https://svcs.dendra.science/api/rpc/dendra.api.metadata.v3alpha1.OrganizationService/ListOrganizations.
The response would be the JSON representation of a list of all organizations.