/w/rest.php/v1/revision/.
Revision IDs are assigned at edit time and are unique across all pages on a wiki. To find revision IDs for a page, use the page history endpoint.
GET /v1/revision/{id}
Returns the wikitext source and full metadata for a specific revision.Path parameters
The numeric revision ID.
Response
The revision ID.
Size of the revision content in bytes.
Whether this revision was flagged as a minor edit.
ISO 8601 timestamp of when the revision was made.
The content model of the revision (e.g.,
wikitext, json).The page this revision belongs to.
License for the content.
The user who made this revision. Null if the user information has been suppressed.
The edit summary. Null if the comment has been suppressed.
Byte difference from the parent revision. Null if the parent revision size is unavailable.
The raw wikitext source of this revision.
GET /v1/revision/{id}/bare
Returns revision metadata without the wikitext source, plus a URL pointing to the HTML representation. Suitable for clients that need revision metadata but will fetch HTML separately.Path parameters
The numeric revision ID.
Response
Same fields asGET /v1/revision/{id} (without source), plus:
The URL from which the Parsoid HTML for this revision can be fetched.
GET /v1/revision/{id}/html
Returns the Parsoid HTML for a specific revision. The response body istext/html.
Path parameters
The numeric revision ID.
The response content type is
text/html, not application/json. The HTML follows the Parsoid HTML specification.GET /v1/revision/{id}/with_html
Returns revision metadata combined with the Parsoid HTML in a single JSON response.Path parameters
The numeric revision ID.
Response
Same fields asGET /v1/revision/{id}/bare, plus:
The full Parsoid HTML of the revision as a string.
GET /v1/revision/{from}/compare/{to}
Compares two revisions and returns a structured JSON diff. Both revisions must belong to the same page. The diff uses thewikidiff2 JSON inline diff format.
Path parameters
The revision ID of the base (older) revision.
The revision ID of the target (newer) revision.
Response
Information about the base revision.
Information about the target revision. Same structure as
from.An array of diff operation objects in the
wikidiff2 JSON inline diff format. Each object describes a block of changed, added, or removed content.