Background
Endpoints in the API gateway share a URL structure that begins with api.wikimedia.org/{namespace}. Namespaces are currently used to group endpoints, either by function or by origin. To make the gateway (and by extension, the API Portal) understandable by users both inside and outside WMF, we should decide on a consistent strategy for how to group endpoints using namespaces, based on the capabilities and user needs.
Current examples:
- MediaWiki Core REST API endpoints under /core
- Short description endpoints under /core
- Wikifeeds endpoints under /feed
- Link recommendation endpoints under /service/linkrecommendation
Versioning: Currently, endpoints in the gateway are versioned by namespace using semantic versioning. This means that if any endpoint in a namespace undergoes a backwards-incompatible change, all endpoints in that namespace must have a version increase.
Expected behavior
There is a clear strategy for namespaces so that there is an obvious place to add new APIs to the gateway
Observed behavior
There are multiple namespace strategies in use, making it unclear where new APIs should be added
Acceptance Criteria
- A generalized first draft of API namespaces has been published to API Portal Wiki page
- The upcoming APIs getting published to API Portal have a clear namespace they should fall into:
- Wikibase REST API > /entities
- Liftwing REST API > /inferences