Description
We seek to implement substantial improvements to our APIs over the next year (or more). This includes introducing new standardized patterns for how to build and structure API experiences, introducing new capabilities through API interfaces, and updating existing endpoints to follow the new structures. In many cases, these changes will be relatively high risk, with the expectation that they must remain stable once officially released.
We therefore need to create repeatable mechanisms that will enable easier and more consistent API experimentation, including establishing standard communication pathways with our technical volunteer communities. We propose including a new 'vBeta' indicator in our routing structure so that it is obvious to developers that the endpoints are in a test phase. The scope of this work will be exploring how to implement that pattern in a repeatable way, including surfacing beta specific modules within the REST Sandbox so that users may discover, interact with, and ultimately provide feedback on the new endpoints.
Conditions of acceptance
This is a research task. Investigate the best approach for the following items:
- Any module can have a 'beta' version, as represented by {modulename}/vbeta/{endpoint} (but not every module will have a beta version, if there is no active beta testing happening)
- 'beta' modules co-exist with the production version of that module. They are defined separately and only contain endpoints that have an active beta version.
- Determine pattern for unit & integration testing naming patterns. With this pattern, there may be two (or more) versions of these tests, depending on the endpoint version.
- Experiment with easier beta registration -- ideally a config deployment is not required to add a 'beta' module.
- Determine a mechanism for including a 'feedback' page on every beta module. This link should be included in the spec, appear in the Sandbox, and have a process for verifying that the page exists.
- Create tickets to implement the items above.
Implementation details
There are other approaches/patterns for API versioning, including for experimental or unstable endpoints. Today, experimentation is done in a haphazard manner across a limited set of teams. For example, the Enterprise team recently introduced the notion of “beta” endpoints (see: Article structured content at the time of this writing). Similarly, the RESTbase APIs have a notion of endpoint stability indicators on their endpoints. However, in both cases, the experimental state is only stated in documentation, which leads to some adoption in production applications.
There is also a pattern where 'v0' indicates that an endpoint is 'unstable'. The existing 'unstable' pattern indicates that the endpoint may change over time, but does not make guarantees for when or how frequently. This can result in unexpected breaking changes when unstable endpoints are used in production applications, which is a frequent occurrence. The proposed 'vBeta' sends a stronger signal about the frequency of change and limited lifespan of the endpoint. Specifically, beta endpoints will change frequently during the beta period as we respond to feedback, and may be either deprecated or elevated to an official version after the beta period is over. Once elevated to a stable version, they will be locked into the stable version policy.