Page MenuHomePhabricator

prop=links does not work with revids
Closed, DeclinedPublic

Description

prop=links does not work with revids.

https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&prop=links&format=json&revids=6330157 should return the links used in that revid, not the current links.

Reported at https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#API_question

Event Timeline

Nirmos raised the priority of this task from to Needs Triage.
Nirmos updated the task description. (Show Details)
Nirmos subscribed.
Anomie claimed this task.
Anomie subscribed.

Impossible to do at all efficiently, sorry.

Most prop modules return the data for the latest revision of the page corresponding to the revids.

Maybe at least provide a warning to let users know that the resulting data is not for the requested revision? If a user makes a request with revids=i, users will probably expect to get the links for the requested revision, and in many cases it won't be obvious that the results are not what the user was trying to get.

legoktm just pointed out to me that you can do this kind of query alternatively using action=parse: https://en.wikipedia.org/w/api.php?action=parse&oldid=6330157&prop=links

Maybe at least provide a warning to let users know that the resulting data is not for the requested revision?

Open a new task for the request?

Also consider whether you just want an update to the api-pageset-param-revids message cautioning that many modules operate on the corresponding page rather than the specific revisions listed, or if you're requesting a warning in the API response when this actually occurs. Note a warning in the response that clients can't easily prevent might be considered annoying.