MediaWiki API help

This is an auto-generated MediaWiki API documentation page.

Documentation and examples: https://www.mediawiki.org/wiki/API

action=protect

(main | protect)
  • Este módulo requiere permisos de lectura.
  • Este módulo requiere permisos de escritura.
  • Este módulo solo acepta solicitudes POST.

Change the protection level of a page.

Parámetros:
title

Title of the page to (un)protect. Cannot be used together with pageid.

pageid

ID of the page to (un)protect. Cannot be used together with title.

protections

List of protection levels, formatted action=level (e.g. edit=sysop).

Note: Any actions not listed will have restrictions removed.

Este parámetro es obligatorio.
Separar los valores con |. Maximum number of values is 50 (500 for bots).
expiry

Expiry timestamps. If only one timestamp is set, it'll be used for all protections. Use infinite, indefinite, infinity, or never, for a never-expiring protection.

Separar los valores con |. Maximum number of values is 50 (500 for bots).
Predeterminado: infinite
reason

Motivo de la (des)protección.

Predeterminado: (vacío)
cascade

Enable cascading protection (i.e. protect pages included in this page). Ignored if all protection levels given do not support cascading.

watch
En desuso.

If set, add the page being (un)protected to the current user's watchlist.

watchlist

Unconditionally add or remove the page from the current user's watchlist, use preferences or do not change watch.

Un valor: watch, unwatch, preferences, nochange
Predeterminado: preferences
token

A "csrf" token retrieved from action=query&meta=tokens

Este parámetro es obligatorio.