API:Patrol

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

Quick overview:

v · d · e
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. Patrol tokens can be obtained via action=tokens with type=patrol (MW 1.20+), or by using the following method:

Obtaining a patrol token

Patrolling changes[edit | edit source]

You can patrol changes using action=patrol. Note that this module only accepts POST requests.

Parameters[edit | edit source]

  • rcid: Recentchanges ID to patrol
  • revid: Revision ID to patrol
  • token: The token obtained in the previous request. Take care to encode the + as %2B

Example[edit | edit source]

Patrolling rcid 242005359

Possible errors[edit | edit source]

In addition to the usual stuff:

Code Info
nosuchrcid There is no change with rcid "id"
patroldisabled Patrolling is disabled on this wiki
noautopatrol You don't have permission to patrol your own changes
Note: Only users with the autopatrol right can do this