Allow fetching the first (earliest) revision of many pages in prop=revisions
Open, Needs TriagePublic

Description

prop=revisions makes it easy to get the top-most revision of a number of articles simultaneously e.g. https://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=API|Main%20Page|Hello|Test . The ability to make a similar query to get the first revision of multiple articles would be appreciated. The relevant query https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvdir=newer&titles=API|Main%20Page|Hello|Test is disallowed. The use case is to determine page creators and fetch the relevant metadata.

MER-C created this task.Mar 1 2018, 9:25 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 1 2018, 9:25 PM
Anomie added a subscriber: Anomie.Mar 2 2018, 2:49 PM

We can fetch the most recent revision of many pages because the database has the page_latest field to point to them. Fetching the first revision, on the other hand, would require a separate query for each page.

BTW, the query https://en.wikipedia.org/w/api.php?action=query&prop=revisions&rvdir=newer&titles=API|Main%20Page|Hello|Test probably wouldn't return the first revisions of each of those pages. It would more likely return all the revisions of each of those pages, ordered by page ID then rev_timestamp.