Summary
Certain endpoints for handling Parsoid metadata currently rely on RESTbase. These endpoints need to be rerouted to equivalent MediaWiki REST endpoints as part of the ongoing RESTbase sunset process. This will help standardize calls to the MediaWiki REST API.
Mapping of production URLs to be routed to MediaWiki-REST-API
Data-Parsoid Metadata
- Current Endpoint: /api/rest_v1/page/data-parsoid/{title}/{revision}/{tid}
- MW REST Endpoint: TBD
- Details:
- Parameters: {title}, {revision}, {tid}
- Headers: Include x-restbase-compat with a value of true
- Response: Parsoid metadata in JSON
- Notes:
- The target endpoint for data-parsoid metadata is yet to be determined.
Additional Configuration
- All forwarded calls must include the header x-restbase-compat: true to ensure RESTbase-compatible responses.
- Ensure proper handling of redirects (301 and 302) and document behavior for query parameters like redirect=false.
Acceptance Criteria
- Rerouted endpoints are functional and return expected responses from the MW REST API.
- The rerouting process is validated and approved by:
- @MSantos
- @HCoplin-WMF
- Content-Transform-Team
- ServiceOps (once the initial review is completed)
- All calls are routed through REST Gateway for production use.