Task T231597: Implement GET History Filter added a page history endpoint to the core REST API.
This code still needs several fixes and improvements:
- Recognize the logged-in user. Specifically, the "filter" query should allow users with the deletedhistory right to see revisions (see lines 331–343 from ApiQueryRevisions.php for inspiration), and comment/user inclusion should use FOR_THIS_USER instead of FOR_PUBLIC.
- Fix the "bot" filter query per comments in https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/538133/
- Fix error message construction per comments in https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/538133/
- Remove extraneous space on line 356 per comments in https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/538133/