MediaWiki API help

This is an auto-generated MediaWiki API documentation page.

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

action=protect

(main | protect)
  • Ta modul zahteva pravice branja.
  • This module requires write rights.
  • Ta modul sprejema samo zahtevke POST.
  • Source: MediaWiki
  • License: GPL-2.0-or-later

Change the protection level of a page.

Parameters:
title

Naslov strani za (od)zaščito. Ni ga mogoče uporabiti hkrati z pageid.

pageid

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

Vtipkajte: celo število
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.

Ta parameter je obvezen.
Loči vrednosti z | ali alternative.
Največje število vrednosti je 50 (500 za odjemalce z večjimi dovoljenimi omejitvami)
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.

Loči vrednosti z | ali alternative.
Največje število vrednosti je 50 (500 za odjemalce z večjimi dovoljenimi omejitvami)
Privzeto: infinite
reason

Reason for (un)protecting.

Default: (empty)
tags

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

Values (separate with | or alternative):
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: boolean (details)
watch
Opuščeno.

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

Type: boolean (details)
watchlist

Unconditionally add or remove the page from the current user's watchlist, use preferences (ignored for bot users) or do not change watch.

One of the following values: nochange, preferences, unwatch, watch
Privzeto: preferences
token

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

Ta parameter je obvezen.