Справка 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+
 
Изменить уровень защиты страницы.
- title
 Бит атамаһы. 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
 (ООН) һағы сәбәптәре.
- По умолчанию: (пусто)
 - tags
 Change tags to apply to the entry in the protection log.
- Значения (разделённые |):
 - 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.
- Одно из следующих значений: 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 [open in sandbox]
 - всех өсөн сикләүҙәр ҡуйып,биттән һаҡлауҙы алырға.
 - api.php?action=protect&title=Main%20Page&token=123ABC&protections=edit=all|move=all&reason=Lifting%20restrictions [open in sandbox]
 - Бер ниндәй сикләүҙәр ҡуймай биттән һаҡлауҙы алырға.
 - api.php?action=protect&title=Main%20Page&token=123ABC&protections=&reason=Lifting%20restrictions [open in sandbox]