API:Patrol
From MediaWiki.org
This page is part of the MediaWiki API documentation. |
Language: | English • Deutsch • polski |
---|
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.14 |
Token[edit | edit source]
To patrol a request, a patrol token is required. Since MediaWiki 1.17, the patrol token has no longer been the same as the edit token. The patrol token is the same for all pages, but changes at every login. A patrol token can be obtained as follows: Obtaining a patrol token
Result |
---|
The following content has been placed in a collapsed box for improved usability. |
<?xml version="1.0" encoding="utf-8"?> <api> <query-continue> <recentchanges rcstart="2008-09-06T10:49:06Z" /> </query-continue> <query> <recentchanges> <rc type="edit" ns="0" title="Sites using MediaWiki/uk" rcid="228053" pageid="25473" revid="210889" old_revid="210888" timestamp="2008-09-06T10:58:33Z" patroltoken="8f45aa1dfd9725b4d6a71c66959b111f+\" /> </recentchanges> </query> </api> |
The above content has been placed in a collapsed box for improved usability. |
Patrolling changes[edit | edit source]
You can patrol changes using action=patrol.
Parameters[edit | edit source]
rcid
: Recentchanges ID to patroltoken
: The token obtained in the previous request. Take care to encode the+
as%2B
Example[edit | edit source]
Patrolling rcid 242005359
Result |
---|
The following content has been placed in a collapsed box for improved usability. |
<?xml version="1.0" encoding="utf-8"?> <api> <patrol rcid="242005359" /> </api> |
The above content has been placed in a collapsed box for improved usability. |
Possible errors[edit | edit source]
In addition to the usual stuff:
- code: nosuchrcid
- info: There is no change with rcid ``id''
- code: patroldisabled
- info: Patrolling is disabled on this wiki
- code: noautopatrol
- info: You don't have permission to patrol your own changes
- Only users with the
autopatrol
right can do this
- Only users with the
- info: You don't have permission to patrol your own changes