Page MenuHomePhabricator

Curator reads revision metadata
Closed, ResolvedPublic

Description

"As a Curator, I want to get metadata about a revision of a page, so that I can understand what was changed."

GET /revision/{id}/bare

Return the revision of a page without content.

Request payload: none

Status code:

200 - OK
403 - Not authorized
404 - No such revision

Body: JSON, object with following fields:
id: revision ID
page: Object with these fields

  • id: ID of the page
  • title: current title of the page (might have been changed)

user: user who made the change, object with these fields

  • id: ID of the user or null for anonymous
  • name: name of the user or unique identifier for anonymous

comment: User comment ("edit summary") describing the change that generated this revision
timestamp: time the revision was made
size: size of the revision in "bogobytes" (as from DB, usually bytes)
delta: change from previous revision in "bogobytes" (as from DB, usually bytes)

Event Timeline

eprodromou renamed this task from Curator reads a version to Curator reads a revision .Aug 28 2019, 11:53 PM
eprodromou updated the task description. (Show Details)
eprodromou added a subscriber: tstarling.

Based on conversations with @tstarling, we decided the caching header support is a premature optimization that is getting in the way of getting these endpoints finished. I'm moving the requirements to a separate ticket that we can get to as needed.

I also added the comment field and bundled the page ID and title and the user id and name. @tstarling pointed out that we should probably bundle up these properties related to the same object as sub-objects in the JSON.

eprodromou renamed this task from Curator reads a revision to Curator reads revision metadata .Oct 11 2019, 1:17 AM
eprodromou updated the task description. (Show Details)

Per discussion in Green Team checkin, we removed HTML from this endpoint.

We'd like to use only Parsoid reversible HTML in all the Mediawiki REST API endpoints, but we don't have time to build that into the MediaWiki endpoints. So, we're removing HTML entirely.

I've changed the endpoint to use a different URL, similar to the structure used in T234377. I also added in the size and delta properties, since we use them in the page history output also.

Should this user story mention that unauthorized users should be unable to read this data?

This has working integration tests, so I'm counting it done.