Page MenuHomePhabricator

GET /_version/
Closed, DeclinedPublic

Description

Version check for the daemon in the API; note that it's not prefixed.

https://github.com/wikimedia/parsoid/blob/master/guides/apiuse.md#_version

It might not be possible to support this endpoint in MediaWiki.

Event Timeline

RESTBase doesn't use this. Monitoring? Special:Version ?

Tgr added a subscriber: Tgr.Apr 19 2019, 5:22 PM

The current API sort-of equivalent of Special:Version is action=query&meta=siteinfo. That's probably something we want to port to REST; not sure whether it's the right place for finding out the version of specific API endpoints as it will be rather large. Something like an OPTION request to that endpoint or a /version/<normal endpoint URL> might be easier on clients. Soemthing to consider for the routing handler interface.

Tgr added a comment.EditedApr 19 2019, 5:26 PM

The deeper question here is what versioning even means for an API that's inside MediaWiki. Is it reliable if it doesn't include the MediaWiki core, library, extension etc. versions? Is it still useful if it does include them?

I think the question for me is whether any of the clients that use the ParsoidJS service HTTP interface actually use the /_version/ endpoint. It's documented for ParsoidJS, but it's not namespaced (/api/v3/...) like the other endpoints. If we don't have to provide it, I think it would be OK to leave it out, since it's kind of problematic that way.

Tgr added a comment.Apr 24 2019, 8:11 PM

It made sense for the standalone Parsoid service to provide the Parsoid version at /_version/, it does not make sense within the MediaWiki REST API to do so. So even if it is used, that'll have to change - either it needs to be turned into a more generic versioning endpoint that reports the Parsoid version alongside other API versions, or it needs to move into some sort of Parsoid namespace. (Or we can find a different method altogether for reporting the version.)

eprodromou closed this task as Declined.Wed, Nov 6, 3:15 PM
eprodromou added a subscriber: eprodromou.

I'm closing this as not valid. We haven't seen use for it, and with Parsoid/PHP in production, it's clearly not necessary.