Справка MediaWiki API
This is an auto-generated MediaWiki API documentation page.
Documentation and examples: https://www.mediawiki.org/wiki/API
action=protect
- ÐÑÐ¾Ñ Ð¼Ð¾Ð´ÑÐ»Ñ ÑÑебÑÐµÑ Ð¿Ñав на ÑÑение.
- ÐÑÐ¾Ñ Ð¼Ð¾Ð´ÑÐ»Ñ ÑÑебÑÐµÑ Ð¿Ñава на запиÑÑ.
- ÐÑÐ¾Ñ Ð¼Ð¾Ð´ÑÐ»Ñ Ð¿ÑÐ¸Ð½Ð¸Ð¼Ð°ÐµÑ ÑолÑко Post-запÑоÑÑ.
- ÐÑÑоÑник: MediaWiki
- ÐиÑензиÑ: GPL-2.0+
Change the protection level of a page.
- 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.
- Тип: integer
- protections
List of protection levels, formatted action=level (e.g. edit=sysop).
Note: Any actions not listed will have restrictions removed.
- ÐÑÐ¾Ñ Ð¿Ð°ÑамеÑÑ ÑвлÑеÑÑÑ Ð¾Ð±ÑзаÑелÑнÑм.
- РазделÑйÑе знаÑÐµÐ½Ð¸Ñ Ñ Ð¿Ð¾Ð¼Ð¾ÑÑÑ |. ÐакÑималÑное колиÑеÑÑво знаÑений должно бÑÑÑ 50 (500 Ð´Ð»Ñ Ð±Ð¾Ñов).
- 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.
- РазделÑйÑе знаÑÐµÐ½Ð¸Ñ Ñ Ð¿Ð¾Ð¼Ð¾ÑÑÑ |. ÐакÑималÑное колиÑеÑÑво знаÑений должно бÑÑÑ 50 (500 Ð´Ð»Ñ Ð±Ð¾Ñов).
- Ðо ÑмолÑаниÑ: infinite
- reason
Reason for (un)protecting.
- Ðо ÑмолÑаниÑ: (пÑÑÑо)
- 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.
- Тип: двоиÑнÑй (details)
- watch
- УÑÑаÑевÑий.
If set, add the page being (un)protected to the current user's watchlist.
- Тип: двоиÑнÑй (details)
- watchlist
Unconditionally add or remove the page from the current user's watchlist, use preferences or do not change watch.
- One value: watch, unwatch, preferences, nochange
- Ðо ÑмолÑаниÑ: preferences
- token
A "csrf" token retrieved from action=query&meta=tokens
- ÐÑÐ¾Ñ Ð¿Ð°ÑамеÑÑ ÑвлÑеÑÑÑ Ð¾Ð±ÑзаÑелÑнÑм.
- ÐаÑиÑиÑÑ ÑÑÑаниÑÑ.
- api.php?action=protect&title=Main%20Page&token=123ABC&protections=edit=sysop|move=sysop&cascade=&expiry=20070901163000|never
- Unprotect a page by setting restrictions to all.
- api.php?action=protect&title=Main%20Page&token=123ABC&protections=edit=all|move=all&reason=Lifting%20restrictions
- Unprotect a page by setting no restrictions.
- api.php?action=protect&title=Main%20Page&token=123ABC&protections=&reason=Lifting%20restrictions