"As a Reader, I want to know who contributed to the content of the page, so I can correctly attribute them according to the content license."
We took out the contributors element from T229663: Contributor gets page source because it could be long and would be difficult to retrieve. This user story is for a segmented list of contributors to the page.
These contributors should only be users who've made edits on the shortest path in the edit history.
Also note that the list of contributors is not in reverse-chronological order, so the paging parameters and properties don't need to be explicitly about time, as in T231343: Curator gets page history.
GET /page/{title}/editors
Get a unique list of editors of a page.
Parameters:
- before: a user name. In segment order, only users strictly before this user (non-inclusive).
- after: a user name. For segmentation. Only users strictly after this user (non-inclusive).
If there are no parameters, return the first segment of contributors.
Payload: empty
Notable headers: none
Status codes:
- 200: OK, body is a list segment
- 404: No such page
- 400: No such user (before or after) or user is not a contributor to this page
Response body: a JSON object with the following properties:
- editors: an array of 0 to 100 user references, in no specified order, each with the following properties:
- id: user ID, or null if unregistered or ID is unavailable
- name: registered user name or other unique identifier such as IP address
- next: if there are more contributors than fit in this or previous segments, a link to the API endpoint to get the next segment of contributors (typically, the link for this page plus an after parameter with the ID of the last contributor)
- prev: if there are previous segments, a link to the API endpoint to get the previous segment of contributors (typically, the link for this page plus a before parameter with the ID of the first contributor)
- first: a link to the API endpoint without any parameters