Summary: certain endpoints currently handled by RESTbase should be rerouted to equivalent MediaWiki REST endpoints. This will unblock this portion of RESTbase sunset. It is expected that callers will eventually be moved to new canonical urls, allowing these paths to be completely retired. However, new urls have not yet been defined. Implementing new urls and moving callers will take at least months, if not longer. See T366835: REST: API modularization and versioning (tracking) for related discussion.
Mapping of production URLs to be routed to MediaWiki-REST-API
Page and revision meta-data
- Get revision metadata for a title
- HTTP Verb: GET
- Production Endpoint:
- <domain>/api/rest_v1/page/title/{title}
- Example: https://en.wikipedia.org/api/rest_v1/page/title/Earth
- MW REST Endpoint:
- <domain>/w/rest.php/v1/page/{title}/bare
- Example: https://en.wikipedia.org/w/rest.php/v1/page/Earth/bare
- Get revision metadata for a title, by revision id
- HTTP Verb: GET
- Production Endpoint:
- <domain>/api/rest_v1/page/title/{title}/{revision}
- Example: https://en.wikipedia.org/api/rest_v1/page/title/Earth/1244226389
- MW REST Endpoint:
- <domain>/w/rest.php/v1/revision/{id}/bare
- Example: https://en.wikipedia.org/w/rest.php/v1/revision/1244226389/bare
- Notes:
- The {revision} parameter in the Production Endpoint corresponds to the {id} parameter in the MW REST Endpoint
- The {title} parameter in the Production Endpoint does not have an equivalent in the MW REST Endpoint
Rendered HTML
- Get latest HTML for a title.
- HTTP Verb: GET
- Production Endpoint:
- <domain>/api/rest_v1/page/html/{title}
- Example: https://en.wikipedia.org/api/rest_v1/page/html/Earth
- MW REST Endpoint:
- <domain>/w/rest.php/v1/page/{title}/html
- Example: https://en.wikipedia.org/w/rest.php/v1/page/Earth/html
- Get HTML for a specific title/revision & optionally timeuuid.
- HTTP Verb: GET
- Production Endpoint:
- <domain>/api/rest_v1/page/html/{title}/{revision}
- Example: https://en.wikipedia.org/api/rest_v1/page/html/Earth/1244226389
- MW REST Endpoint:
- <domain>/w/rest.php/v1/revision/{id}/html
- Example: https://en.wikipedia.org/w/rest.php/v1/revision/1244226389/html
- Notes:
- The {revision} parameter in the Production Endpoint corresponds to the {id} parameter in the MW REST Endpoint
- The {title} parameter in the Production Endpoint does not have an equivalent in the MW REST Endpoint
Additional Configuration:
All forwarded calls should include a x-restbase-compat header with a value of 'true'. This instructs the MW REST endpoints to return RESTbase-compatible data.
Acceptance Criteria
- This list is reviewed and approved by @MSantos, @HCoplin-WMF , and @daniel
- This list is reviewed and approved by ServiceOps (will tag them once the first review phase is complete)
- Endpoints are routed through REST Gateway