Page MenuHomePhabricator

Release REST API Sandbox on all remaining wikis
Closed, ResolvedPublic2 Estimated Story Points

Description

Description

Over the course of this quarter, we implemented multi-lingual support for REST API documentation through the REST Sandbox special page. In https://phabricator.wikimedia.org/T389407, we launched the sandbox to an initial set of friendly wiki communities that already had translations in place from translatewiki. The scope of this ticket is to make the REST API sandbox available on all remaining wiki projects, following a ~2 week soak period on the initial set of wikis. We hope to use the soak period to allow the communities to provide feedback about the new experience.

Conditions of acceptance

  • Enable the REST API Sandbox on all remaining wikis.
  • Announce full launch on WikiTech News
  • Announce full launch on wikitech-l distro
Implementation details

Sandbox enablement requires a config change.

Details

Related Changes in Gerrit:

Event Timeline

HCoplin-WMF set the point value for this task to 2.
BPirkle added subscribers: aaron, BPirkle.

Per discussion outside of Phabricator, we will initially enable the following specs on all wikis:

  • "MediaWiki REST API (routes not in modules)" aka "flat routes" aka "routes in coreRoutes.json"
    • available on all wikis
    • spec url: /w/rest.php/specs/v0/module/-
  • Specs module
    • will be made available on all wikis as part of this change (via wgRestAPIAdditionalRouteFiles)
    • spec url: /w/rest.php/specs/v0/module/specs/v0
    • provides an example of exposing a module via the REST Sandbox
    • the urls provided by this module will be visible as part of exposing the coreRoutes.json endpoints, and it is already visible on our initial set of wikis. So it seems a little silly to not put this in the sandbox everywhere too.
  • "Wikimedia RESTbase APIs" aka the specs created under T396805: Define static OpenAPI specs per API family for RESTbase endpoints
    • rerouting is complete for these specs
    • spec url: /api/rest_v1/?spec

We could also enable this, but per discussion outside Phabricator we will not initially do so. Maybe in a followup.

  • Reading Lists
    • available on wikis where wmgUseReadingLists is true
    • provides an example of enabling apis from extensions in the REST Sandbox, for other teams to follow
    • spec url: /rest.php/specs/v0/module/readinglists/v0

There are a few other extensions that could also be included but I'd prefer to let the owning teams add them.

The above lists does not apply to beta, which enabled a slightly different set of specs. Beta currently enables:

  • MediaWiki REST API
  • Specs API
  • Content API

That won't change. However, because of a longstanding typo I just noticed, "Specs API" has not been available in the REST Sandbox dropdown on beta (only, it worked fine on the other wikis that were part of the initial set). I will fix that, thereby making "Specs API" available in the dropdown on beta.

Subscribing @aaron because he worked extensively on the RESTbase spec rerouting.

Change #1196492 had a related patch set uploaded (by BPirkle; author: BPirkle):

[operations/mediawiki-config@master] Enable REST Sandbox on all wikis

https://gerrit.wikimedia.org/r/1196492

Change #1196492 merged by jenkins-bot:

[operations/mediawiki-config@master] Enable REST Sandbox on all wikis

https://gerrit.wikimedia.org/r/1196492

Mentioned in SAL (#wikimedia-operations) [2025-10-20T13:46:46Z] <lucaswerkmeister-wmde@deploy2002> Started scap sync-world: Backport for [[gerrit:1196492|Enable REST Sandbox on all wikis (T389409)]], [[gerrit:1192913|Growth: remove no longer in use GENewcomerTasksStarterDifficultyEnabled (T396382)]], [[gerrit:1196857|MetricsPlatform: Initialize $wgMetricsPlatformExperimentStreamNames (T406332)]], [[gerrit:1196703|Enable Special:EditWatchlist pagination on beta (T41510)]]

Mentioned in SAL (#wikimedia-operations) [2025-10-20T13:51:18Z] <lucaswerkmeister-wmde@deploy2002> sgimeno, bpirkle, phuedx, lucaswerkmeister-wmde, cparle: Backport for [[gerrit:1196492|Enable REST Sandbox on all wikis (T389409)]], [[gerrit:1192913|Growth: remove no longer in use GENewcomerTasksStarterDifficultyEnabled (T396382)]], [[gerrit:1196857|MetricsPlatform: Initialize $wgMetricsPlatformExperimentStreamNames (T406332)]], [[gerrit:1196703|Enable Special:EditWatchlist paginati

Mentioned in SAL (#wikimedia-operations) [2025-10-20T14:02:31Z] <lucaswerkmeister-wmde@deploy2002> Finished scap sync-world: Backport for [[gerrit:1196492|Enable REST Sandbox on all wikis (T389409)]], [[gerrit:1192913|Growth: remove no longer in use GENewcomerTasksStarterDifficultyEnabled (T396382)]], [[gerrit:1196857|MetricsPlatform: Initialize $wgMetricsPlatformExperimentStreamNames (T406332)]], [[gerrit:1196703|Enable Special:EditWatchlist pagination on beta (T41510)]] (duration

The REST Sandbox is now available on all wikis, with the following initial set of modules:

  • flat routes (routes not in modules) in coreRoutes.json
  • flat routes (routes not in modules) in various extensions
  • Specs module

Additional modules (ex. Reading Lists) can be added over time. We expect to add RESTbase specs soon, per T396805: Define static OpenAPI specs per API family for RESTbase endpoints.