Jump to content

User:DKinzler (WMF)/REST API Zones

From mediawiki.org

This is a draft for a proposal, not reality!

API zones agre groups of component APIs that share operational constraints, requirements, or guarantees. While default (unnamed) zone would be used ofr general purpose APIs that are stable for third party use, other zones may be useful, such as:

  • internal: APIs intended for use by client side code that is deployed by MediaWiki itself. May change without warning when MediaWiki is updated.
  • development: Still under development, may change without warning at any time.
  • beta: Provided for public testing, a candidate for becoming stable.
  • wmf-apps: Reserved for the use by apps maintained by WMF.
  • bot: reserved for use by community-approved bots

API zones are visible in the the API's URL as a prefix to the component name. For instance, the beta release of the next version of a content API currently available under /content.v2/ may be exposed as /beta:content.v3/; and a copy of the article API reserved for the apps may be exposed under /wmf-apps:article.v1/, while the same API may be availabel to the general public under /article.v1/.

Zone prefixes make it obvious to the consumer when they are using restricted or unstable APIs. And they make it easy for SRE teams to enforce restrictions or provide additional resources to requests for specific zones.