API:Recentchanges
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
- Authentication
- Queries
- Search suggestions
- Expanding templates and rendering
- Purging pages' caches
- Parameter information
- Changing wiki content
- Watchlist feed
- Extensions
- Using the API in MediaWiki and extensions
- Miscellaneous
- Implementation
- Client code
MediaWiki version: | 1.10 |
Get all recent changes to the wiki, à la Special:Recentchanges. This module can be used as a generator (but note that, like all other generators, it generates information about pages, not about revisions). Apparently, although many log actions can be viewed using this module, patrol actions are not among them.
Contents |
[edit] Parameters
rcstart
: The timestamp to start listing fromrcend
: The timestamp to end listing atrcdir
: Direction to list inolder
: List newest changes first (default). Note:rcstart
has to be later thanrcend
.newer
: List oldest changes first. Note:rcstart
has to be beforercend
.
rcnamespace
: Only list changes in these namespacesrcuser
: Only list changes made by this userrcexcludeuser
: Do not list changes made by this userrctag
: Only list changes tagged with this tagrctype
: Only list certain types of changesedit
: Regular page editsnew
: Page creationslog
: Log entries
rcshow
: Only list items that meet these criteria. Conflicting options (such asminor
and!minor
) cannot be used togetherminor
: Only list minor edits!minor
: Don't list minor editsbot
: Only list bot edits!bot
: Don't list bot editsanon
: Only list edits by anonymous users!anon
: Only list edits by registered usersredirect
: Only list edits to pages that are currently redirects!redirect
: Only list edits to pages that currently aren't redirectspatrolled
: Only list edits flagged as patrolled. Only available to users with thepatrol
right!patrolled
: Only list edits not flagged as patrolled. Only available to users with thepatrol
right
rcprop
: Which properties to getuser
: The user who made the change. Also returns anon="" if it was an anonymous edit.userid
: The user id who made the change.comment
: The edit/log commentparsedcomment
: The parsed comment for the edit/log commenttimestamp
: The time and date of the change (default)title
: The title the change was made to (default)ids
: Gets the following IDs:pageid
(rc_cur_id);rcid
(rc_this_oldid);old_revid
(rc_last_oldid); andrcid
(rc_id) (used for patrolling). (default)sizes
: The page size before (oldlen
) and after (newlen
) the changeredirect
: Whether the changed page is currently a redirectpatrolled
: Whether the change is patrolled. Only available to users with thepatrol
rightloginfo
: If the change was a log event, add thelogid
,logtype
andlogaction
fields and the log parameters (since >=1.13.0)tags
: List tags for the entryflags
:
rctoken
: Which tokens to obtain for each changepatrol
: The patrol token
rclimit
: Maximum amount of changes to list (10 by default)rctoponly
: Only list changes which are the latest revision
[edit] Example
Get the 3 most recent changes with sizes and flags
<?xml version="1.0" encoding="utf-8"?> <api> <query-continue> <recentchanges rcstart="2008-03-25T22:03:47Z" /> </query-continue> <query> <recentchanges> <rc type="log" ns="-1" title="Special:Log/protect" rcid="205182563" pageid="0" revid="0" old_revid="0" user="Yamla" oldlen="0" newlen="0" /> <rc type="new" ns="0" title="Clasico de Avellaneda" rcid="205182562" pageid="16578364" revid="200906507" old_revid="0" user="Eubot" bot="" new="" oldlen="0" newlen="66" /> <rc type="edit" ns="3" title="User talk:Diligent Terrier" rcid="205182561" pageid="12353452" revid="200906506" old_revid="200863749" user="Basketball110" oldlen="202363" newlen="202761" /> </recentchanges> </query> </api>
Possible warnings
- Action 'action' is not allowed for the current user
- Thrown when a token is requested that the current user isn't allowed to use
[edit] Error Codes
- code: rcshow
- info: Incorrect parameter - mutually exclusive values may not be supplied
- code: rcpermissiondenied
- info: You need the patrol right to request the patrolled flag