Page MenuHomePhabricator

[5.5.3 Milestone]: Propose and align on API response shapes using MW REST reference implementations
Open, Needs TriagePublic

Description

Description

We need to evolve our APIs to provide better alignment and more consistent experiences. We will utilize the MW REST API beta program to implement and encourage interaction with the new patterns, which will allow developers to interact with, test, and provide feedback on the patterns before the work is locked in. The initial endpoints will reflect changes that we are relatively confident in, or which have industry standard practices that we may follow (eg: pagination, error message structure).

Conditions of acceptance

Define standard patterns and create reference implementations for:

  • Versioning
  • [Stretch] Audience/usage specification
  • Error codes and message structure
  • Pagination (NOTE: MW REST API currently has no endpoints that expect/require pagination; page history is the closest, with revision skip values)
    • New page history endpoint as candidate
  • Implement at least ~5 endpoints from the MediaWiki REST API to reflect the new standards.
    • Marked as beta & only available on testwiki
    • Feature flagged within the 1.44 release, to prevent accidental adoption
    • Route new endpoints through [REST Gateway] as the centralized standard gateway
  • Invite internal and community developers to test the new API formats and provide feedback on the experience.