The Wayback Machine - https://web.archive.org/web/20160827233030/https://www.mediawiki.org/wiki/API:Compare

API:Compare

From MediaWiki.org
Jump to: navigation, search
Tools clipart.png This page is part of the MediaWiki action API documentation.
MediaWiki APIsAPI:Main page

MediaWiki action API

v · d · e

Get the difference between two pages.

A revision number, a page title, or a page ID for both "from" and "to" must be passed.

Parameters[edit]

  • fromtitle: First title to compare.
  • fromid: First page ID to compare. 1.20+
  • fromrev: First revision to compare.
  • totitle: Second title to compare.
  • toid: Second page ID to compare. 1.20+
  • torev: Second revision to compare.

Example[edit]

Compare two revisions from the same page

Compare the current revisions of two different pages

action=compare

(main | compare)
  • This module requires read rights.
  • Source: MediaWiki
  • License: GPL-2.0+

Get the difference between 2 pages.

A revision number, a page title, or a page ID for both "from" and "to" must be passed.

Parameters:
fromtitle

First title to compare.

fromid

First page ID to compare.

Type: integer
fromrev

First revision to compare.

Type: integer
totitle

Second title to compare.

toid

Second page ID to compare.

Type: integer
torev

Second revision to compare.

Type: integer
Example:
Create a diff between revision 1 and 2.
api.php?action=compare&fromrev=1&torev=2 [open in sandbox]

Navigation menu

Personal tools

Namespaces

Variants

More

In other languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.