Review Board supports working with repositories across a variety of hosting services through a set of modules that know how to both represent and talk to that service. In order for this to work, we often need a set of APIs on the hosting service that we can use to make certain requests. This document will serve as a guide for those requirements.

API Requirements

For some types of repositories, we don't actually need any APIs, and can usually talk directly to the repository itself. This is usually true for:

For some repositories, though, an API is required. This is particularly true for Git, which has very limited remote protocol support. It's also true even for the above repositories if a non-standard authentication mechanism is being used.

This section covers the requirements than an API (or a repository-level protocol) must support.

Most of these APIs are optional, but are highly encouraged, as they’ll provide a better experience for users.

File Retrieval API (required)

Review Board needs to be able to look up files from a repository when viewing a diff, in order to generate the side-by-side diff viewer. This must take a full file path (as referenced in a diff for that type of repository), and return the exact data from the repository (byte-for-byte compatible, no impact on the encoding).