Page MenuHomePhabricator

Implement GET /page/{title}/with_html
Closed, InvalidPublic


Acceptance Criteria:

  • Define route for /page/{title}/with_html
  • Define route handler for page
  • Request:
    • Must support HTTP GET
    • Must support title param, this provides the title of the requested page
    • Request body must be empty
    • Request headers:
      • Must support If-Modified-Since: only if the result set has changed since this date
      • Must support If-None-Match: only if the result set's etag is different from this
  • Response
    • Response must return JSON
    • Responses JSON must have structure:
"id": 12345,
"revision_id": 67890,
"key": "Talk:Main_Page",
"title": "Talk:Main Page",
html: "<div>This is the Main Page. Check out the <a href='../News'>News</a>.</div>"
  • id must contain the page numeric ID.
  • revision_id must contain the numeric ID of the most recent revision.
  • key must contain the pdbk version of the title
  • title must contain the version of the title most suited for display, with spaces instead of underscores
  • html must contain the reversible HTML of the page as generated by Parsoid
  • Response headers must contain:
    • Last-Modified: last time this result set was modified
    • ETag: etag for this result set

Related Objects