MediaWiki API help
This is an auto-generated MediaWiki API documentation page.
Documentation and examples: https://www.mediawiki.org/wiki/API
action=protect
- Questo modulo richiede i diritti di lettura.
 - Questo modulo richiede i diritti di scrittura.
 - Questo modulo accetta solo richieste POST.
 - Fonte: MediaWiki
 - Licenza: GPL-2.0+
 
Modifica il livello di protezione di una pagina.
- title
 Titolo della pagina da (s)proteggere. Non può essere usato insieme a pageid.
- pageid
 ID della pagina da (s)proteggere. Non può essere usato insieme con title.
- Tipo: intero
 - protections
 List of protection levels, formatted action=level (e.g. edit=sysop). A level of all means everyone is allowed to take the action, i.e. no restriction.
Note: Any actions not listed will have restrictions removed.
- Questo parametro è obbligatorio.
 - Separa i valori con | o alternativa. Il numero massimo di valori è 50 (500 per i bot).
 - 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.
- Separa i valori con | o alternativa. Il numero massimo di valori è 50 (500 per i bot).
 - Predefinito: infinite
 - reason
 Reason for (un)protecting.
- Predefinito: (vuoto)
 - tags
 Modifica etichette da applicare all'elemento del registro delle protezioni.
- Valori (separati da | o alternativa):
 - cascade
 Enable cascading protection (i.e. protect transcluded templates and images used in this page). Ignored if none of the given protection levels support cascading.
- Tipo: booleano (dettagli)
 - watch
 - Deprecato.
 If set, add the page being (un)protected to the current user's watchlist.
- Tipo: booleano (dettagli)
 - watchlist
 Unconditionally add or remove the page from the current user's watchlist, use preferences or do not change watch.
- Uno dei seguenti valori: watch, unwatch, preferences, nochange
 - Predefinito: preferences
 - token
 Un token "csrf" recuperato da action=query&meta=tokens
- Questo parametro è obbligatorio.
 
- Proteggi una pagina.
 - api.php?action=protect&title=Main%20Page&token=123ABC&protections=edit=sysop|move=sysop&cascade=&expiry=20070901163000|never [apri in una sandbox]
 - Sproteggi una pagina impostando restrizione su all (cioè a tutti è consentito intraprendere l'azione).
 - api.php?action=protect&title=Main%20Page&token=123ABC&protections=edit=all|move=all&reason=Lifting%20restrictions [apri in una sandbox]
 - Sproteggi una pagina impostando nessuna restrizione.
 - api.php?action=protect&title=Main%20Page&token=123ABC&protections=&reason=Lifting%20restrictions [apri in una sandbox]