API:Deletedrevs

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

Quick overview:

v · d · e


MediaWiki version: = 1.12
NOTE: This module's behavior was changed significantly in MediaWiki 1.15. Some of the features described here are not available in MediaWiki 1.14 and earlier.

List deleted revisions. You need the deletedhistory right to use this module. This module cannot be used as a generator. This module can be used in one of three modes:

  1. List deleted revisions for the given titles (through titles or a generator), sorted by timestamp
  2. List deleted contributions for a certain user, sorted by timestamp (druser set, no titles given)
  3. List all deleted revisions in a certain namespace (druser not set, no titles given)

Some parameters are restricted to certain modes only, and are marked accordingly. For instance, a parameter marked (1,2) only applies to modes 1 and 2 and is ignored in mode 3.

Parameters[edit | edit source]

  • drlimit: Maximum number of revisions to list (10 by default)
  • druser: Only list revisions by this user
  • drexcludeuser: Don't list revisions by this user
  • drstart: The timestamp to start listing from (optional). If not specified, all revisions before drend will be listed. (1,2)
  • drend: The timestamp to end listing at (optional). If not specified, all revisions later than drstart will be listed. (1,2)
  • drdir: Direction to list in. (1,2)
    • older: List newest revisions first (default). Note: drstart has to be later than drend.
    • newer: List oldest revisions first. Note: drstart has to be before drend.
  • drnamespace: List all deleted revisions in this namespace (3)
  • drunique: List only one revision for each page (3)
  • drfrom: Start listing at this title (3)
  • drcontinue: When more results are available, use this to continue (3) Note: may only work if drdir is set to newer.
  • drprop: Which properties to get
    • revid: Revision ID
    • user: User who made the edit (default)
    • comment: Edit comment (default)
    • minor: Whether the edit was minor
    • len: Revision size
    • content: Revision content. You need the undelete right to use this option
    • token: Undelete token

Examples[edit | edit source]

Listing the 8 most recent deleted revisions dated September 4, 2007 (mode 3).

Error Codes[edit | edit source]

  • code: drpermissiondenied
    • info: You don't have permission to view deleted revision information
      • On most wikis, viewing deleted revisions is restricted to sysops, but other wikis may have stricter rules.
  • code: drpermissiondenied
    • info: You don't have permission to view deleted revision content