API:Protect/FIXME

Prefix: None Required Rights: None POST Only? No  Change the protection level of a page

Parameters
Ignored if not all protection levels are 'sysop' or 'protect'. Type: bool Use 'infinite', 'indefinite' or 'never', for a neverexpiring protection. .
 * cascade – Enable cascading protection (i.e. protect pages included in this page)
 * expiry – Expiry timestamps. If only one timestamp is set, it'll be used for all protections.
 * protections (required) – Pipe-separated list of protection levels, formatted action=group (e.g. edit=sysop).
 * reason – Reason for (un)protecting (optional) . Type: string
 * title (required) – Title of the page you want to (un)protect . Type: string
 * token – A protect token previously retrieved through prop=info . Type: string
 * watch – If set, add the page being (un)protected to your watchlist.
 * watchlist – Unconditionally add or remove the page from your watchlist, use preferences or do not change watch.
 * Type: one of watch, unwatch, preferences, nochange

Errors Codes

 * badtoken – Invalid token.
 * create-titleexists – Existing titles can't be protected with 'create'.
 * invalidexpiry – Invalid expiry time ``expiry''.
 * invalidtitle – Bad title ``title''.
 * missingtitle-createonly – Missing titles can only be protected with 'create'.
 * mustbeposted – The protect module requires a POST request.
 * noapiwrite – Editing of this wiki through the API is disabled. Make sure the $wgEnableWriteAPI=true; statement is included in the wiki's LocalSettings.php file.
 * noprotections – The protections parameter must be set.
 * notitle – The title parameter must be set.
 * notoken – The token parameter must be set.
 * pastexpiry – Expiry time ``expiry'' is in the past.
 * protect-invalidaction – Invalid protection type ``action''.
 * protect-invalidlevel – Invalid protection level ``level''.
 * readapidenied – You need read permission to use this module.
 * toofewexpiries – noofexpiries expiry timestamps were provided where noofprotections were needed.
 * writeapidenied – You're not allowed to edit this wiki through the API.