Page MenuHomePhabricator

Mark and announce transform endpoints with trailing slash as deprecated
Closed, ResolvedPublic

Description

Description

We currently have two versions of every transform endpoint, surfaced both through the Sandbox documentation and actual functionality. One version of the endpoint allows for a trailing slash without additional information, whereas the other version only accepts a trailing slash if it is followed by a page title (see screenshot below). This is confusing for users, presents an anti-pattern for REST principles, and is needlessly complicated for us to support.

Additionally, the current trailing slash endpoint sees limited traffic with a high rate of errors and test calls. It would be best to deprecate and fully remove it from our system before we see additional adoption. The work outlined in this ticket focuses on the deprecation announcement and formally marking the trailing slash endpoints as deprecated, with a follow up ticket to actually remove them from code.

image.png (855×873 px, 143 KB)

Conditions of acceptance

  • Send deprecation announcement to wikitech-l
  • Send deprecation announcement to WikiTech News
  • Mark endpoints as deprecated in documentation
  • Surface deprecation status within the REST Sandbox description --> Add deprecated: true to the OpenAPI spec
  • Create and update changelog (pending sign off on changelog style guide proposal & location alignment)
NOTE: A future/follow up task will actually remove them from code.

Event Timeline

There is some background discussion on the trailing slashes in T392608: [SPIKE] Determine the best approach for surfacing 'Transform' endpoints in the REST Sandbox. Summary is that this is more of an accident of how the original versions where coded, than an intentional decision.

I'm very much in favor of eliminating the "trailing slash" versions.

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

[mediawiki/core@master] Deprecate transform endpoints with trailing slashes.

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

Change #1193295 merged by jenkins-bot:

[mediawiki/core@master] Deprecate transform endpoints with trailing slashes.

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

This change to mark these endpoints as deprecated in the OpenAPI spec is riding this week's train.

They will not immediately begin sending the Deprecation header, but support for that is riding this week's train and we can add that in a followup.

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

[mediawiki/core@master] Add deprecated "since" date to already-deprecated transform endpoints. These endpoints were marked as deprecated in 1.45.0-wmf.22, but no deprecated "since" date was included. Add that, so that the RFC9745 "deprecation" header will be sent with responses.

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

Change #1194729 merged by jenkins-bot:

[mediawiki/core@master] Add deprecated "since" date to already-deprecated transform endpoints.

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

Marking this as resolved. Sunsetting will occur at the end of Jan 2026 (called out in all relevant comms).

Email distro announcements went out on Oct 21.
Update is also included in Oct 27 Tech News: https://meta.wikimedia.org/wiki/Tech/News/2025/44

Changelog is here: https://www.mediawiki.org/wiki/API:REST_API/Changelog
Deprecation process page is here: https://www.mediawiki.org/wiki/API/Deprecation