The task proposes the introduction of “audience designations” for REST API modules.
The idea is that each REST module should specify what audience(s) the module is intended for. A module’s audience designation can govern access control, routing, stability guarantees, and applicable terms of service.
The audience designation would become part of API URLs, to make it obvious what rules apply to that API. This way the audience designation is easily accessible across all layers, from client side code through the CDN layer, the REST framework and the actual handler code. On the other hand, the designation can also just be treated as part of the API module name. Each layer can make use of the designation, but doesn’t have to be aware of it.
Some examples of potential REST URLs including audience designations:
- https://en.wikipedia.org/api/beta:content.v2/revision/123456
- https://en.wikipedia.org/api/internal:rcfeed/change/123456
- https://en.wikipedia.org/api/private:jobqueue/run
- https://en.wikipedia.org/api/app:readinglists.v1/lists
- https://en.wikipedia.org/api/enterprise:wme.v2/articles/Earth
White paper with more details: https://docs.google.com/document/d/1yarF_xQkFzQJUOvP3rMooFTFL6tKgK3C-Bf8zV00QR4/edit
See also: