API:Protect/ru

Токен
Чтобы изменить уровень защиты страницы, требуется CSRF токен. Этот токен одинаков для всех страниц, но меняется при каждом входе в учётную запись. CSRF токены могут быть получены посредством с параметром   (MW 1.24+).

В более ранних версиях MediaWiki требовался токен защиты («protect»), сейчас он считается устаревшим. Этот токен равен токену редактирования и одинаков для всех страниц, но меняется при каждом входе в систему. Токены защиты могут быть получены через с type=protect (MW 1.20+), или используя следующий метод:

Protecting pages
Pages can be protected with action=protect.

Parameters

 * If you want to remove a protection, use  as group, e.g.
 * If you leave out an action, the associated value won't be changed, i.e.  leaves the move protection untouched.
 * The number of expiry timestamps must equal the number of protections, or you'll get an error message
 * An exception to this rule is made for backwards compatibility: if you specify exactly one expiry timestamp, it'll apply to all protections
 * Not setting this parameter is equivalent to setting it to
 * The latter is to prevent people who shouldn't be able to protect pages from protecting them anyway by transcluding them in a page with cascading protection.
 * The number of expiry timestamps must equal the number of protections, or you'll get an error message
 * An exception to this rule is made for backwards compatibility: if you specify exactly one expiry timestamp, it'll apply to all protections
 * Not setting this parameter is equivalent to setting it to
 * The latter is to prevent people who shouldn't be able to protect pages from protecting them anyway by transcluding them in a page with cascading protection.
 * The latter is to prevent people who shouldn't be able to protect pages from protecting them anyway by transcluding them in a page with cascading protection.
 * The latter is to prevent people who shouldn't be able to protect pages from protecting them anyway by transcluding them in a page with cascading protection.
 * The latter is to prevent people who shouldn't be able to protect pages from protecting them anyway by transcluding them in a page with cascading protection.
 * The latter is to prevent people who shouldn't be able to protect pages from protecting them anyway by transcluding them in a page with cascading protection.

Possible errors
In addition to the usual stuff: