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)
  • Denne modulen krever lesetilgang.
  • Denne modulen krever skrivetilgang.
  • Denne modulen aksepterer bare POST forespørsler.
  • Kilde: MediaWiki
  • Lisens: GPL-2.0-or-later

Change the protection level of a page.

Parametre:
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.

Type: heltall
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.

Denne parameteren er påkrevd.
Separer verdier med | eller alternativ. Maksimalt antall verdier er 50 (500 for botter)
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.

Separer verdier med | eller alternativ. Maksimalt antall verdier er 50 (500 for botter)
Standard: infinite
reason

Reason for (un)protecting.

Standard: (tom)
tags

Change tags to apply to the entry in the protection log.

Verdier (separer med | eller alternativ):
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.

Type: boolsk verdi (detaljer)
watch
Utgått.

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

Type: boolsk verdi (detaljer)
watchlist

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

Én av følgende verdier: watch, unwatch, preferences, nochange
Standard: preferences
token

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

Denne parameteren er påkrevd.