API:Deletedrevs
From MediaWiki.org
This page is part of the MediaWiki API documentation. |
Language: | English |
---|
Quick overview:
- Quick start guide
- FAQ
- Tutorial
- Formats
- Error reporting
- Restricting usage
- Cross-site requests
- Authentication
- Queries
- Search suggestions
- Parsing wikitext and expanding templates
- Purging pages' caches
- Parameter information
- Changing wiki content
- Watchlist feed
- Wikidata
- Extensions
- Using the API in MediaWiki and extensions
- Miscellaneous
- Implementation
- Client code
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:
- List deleted revisions for the given titles (through
titles
or a generator), sorted by timestamp - List deleted contributions for a certain user, sorted by timestamp (
druser
set, no titles given) - 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 userdrexcludeuser
: Don't list revisions by this userdrstart
: 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 getrevid
: Revision IDuser
: User who made the edit (default)comment
: Edit comment (default)minor
: Whether the edit was minorlen
: Revision sizecontent
: Revision content. You need theundelete
right to use this optiontoken
: Undelete token
Examples[edit | edit source]
Listing the 8 most recent deleted revisions dated September 4, 2007 (mode 3).
Result |
---|
The following content has been placed in a collapsed box for improved usability. |
<?xml version="1.0" encoding="utf-8"?> <api> <query-continue> <deletedrevs drstart="20070904142729" /> </query-continue> <query> <deletedrevs> <page title="Main Page" ns="0" token="e4c475f13be7824135b4edbebf4140ff+\"> <revisions> <rev timestamp="20070904200804" revid="31" user="Catrope" minor="" len="" /> <rev timestamp="20070904200753" revid="30" user="Catrope" minor="" len="" /> <rev timestamp="20070904193501" revid="29" user="Catrope" minor="" len="568" /> <rev timestamp="20070904193213" revid="28" user="Catrope" minor="" len="470" /> <rev timestamp="20070904193103" revid="27" user="192.168.1.3" len="568" /> <rev timestamp="20070904193048" revid="26" user="192.168.1.3" len="480" /> </revisions> </page> <page title="User:Catrope" ns="2" token="e4c475f13be7824135b4edbebf4140ff+\"> <revisions> <rev timestamp="20070904143938" revid="24" user="Catrope" len="52" /> <rev timestamp="20070904142758" revid="23" user="Catrope" len="37" /> </revisions> </page> </deletedrevs> </query> </api> |
The above content has been placed in a collapsed box for improved usability. |
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.
- info: You don't have permission to view deleted revision information
- code: drpermissiondenied
- info: You don't have permission to view deleted revision content