"As a Curator, I want to know how many revisions were made between two revisions I am comparing, so I can know how much work went into the differences I'm reviewing."
When displaying a diff between two revisions, our clients also show how many revisions happened between the two revisions. (See https://en.wikipedia.org/w/index.php?title=France&type=revision&diff=920186445&oldid=914890923 for an example, "(8 intermediate revisions by 7 users not shown)").
For "intermediate revisions", I think we are talking about non-deleted revisions, that are strictly between the two compared revisions, non-inclusive. So with a revision history with IDs in reverse chron order 50, 40, 30, 20, 10:
- the number of intermediate revisions between ID 50 and 10 is 3
- the number of intermediate revisions between 50 and 40 is 0
- the number of intermediate revisions between 20 and 50 is 2
- the number of intermediate revisions between 30 and 30 is an error
GET /page/{title}/history/edits?from=<from>&to=<to>
Return the number of intermediate revisions between revision with id from and revision with id to, non-inclusive
Request body: none
Notable request headers: none
Status codes:
- 200: body is the intermediate revision count
- 404: revision with id from and/or revision with id to do not exist
- 403: revision with id from and/or revision with id to is unauthorized, or page that these are revisions of is unauthorized
- 400: client error, such as if from and to are the same ID, or if from and to are not revisions of the same page
Notable response headers: none
Response body: JSON object with the following properties
- count: integer of 0 or more representing count of non-inclusive non-deleted intermediate revisions between revision with id from and revision with id to (see above for examples)