Page MenuHomePhabricator

Enable the REST API with the Wikibase extension
Closed, ResolvedPublic2 Estimated Story Points

Description

Currently, the Wikibase REST API is enabled by adding $wgRestAPIAdditionalRouteFiles[] = 'extensions/Wikibase/repo/rest-api/routes.json'; to the LocalSettings.php file. This was sensible while the REST API was in beta, as it let individual instances select if they wanted to enable the REST API or not.

With the REST API v1 soon to be released, we should move the route definitions from repo/rest-api/routes.json into the extension-repo.json file so that the REST API is enabled when the Wikibase extension is loaded. This will help ensure that there is consistent functionality across all Wikibase instances.

We should also consider backporting this change to the REL1_43 LTS release.

Event Timeline

Tarrow subscribed.

I think this would make a lot of sense. At the time of doing this we should probably mention something in the release notes too.

WMDE-leszek set the point value for this task to 2.Oct 28 2024, 3:32 PM
WMDE-leszek moved this task from Backlog to Polished on the Wikibase Reuse Team board.
WMDE-leszek moved this task from Polished to Ready for planning on the Wikibase Reuse Team board.

Noting down the order to do things in as decided by engineers:

  • Wait for T342992: 👷️ Create a property to be marked as production ready Decided not to wait for the CreateProperty endpoint just for cosmetic versioning reasons
  • Copy all the routes from repo/rest-api/routes.json to extension-repo.json
  • Change from v0 to v1 in the extension-repo.json only - as part of T378455: Change REST API from v0 to v1
  • Leave repo/rest-api/routes.json around until we have decided to disable v0

Change #1085455 had a related patch set uploaded (by Ollie Shotton; author: Ollie Shotton):

[mediawiki/extensions/Wikibase@master] REST: Create REST API v1 release and enable with Wikibase extension

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

Change #1085455 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Create REST API v1 release and enable with Wikibase extension

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

Change #1089794 had a related patch set uploaded (by Ollie Shotton; author: Ollie Shotton):

[mediawiki/extensions/Wikibase@REL1_43] REST: Create REST API v1 release and enable with Wikibase extension

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

Change #1089794 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@REL1_43] REST: Create REST API v1 release and enable with Wikibase extension

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