MediaWiki API hulp
This is an auto-generated MediaWiki API documentation page.
Documentation and examples: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=protect
- Voor deze module zijn leesrechten nodig.
- Voor deze module zijn schrijfrechten nodig.
- This module only accepts POST requests.
- Bron: MediaWiki
- Licentie: GPL-2.0-or-later
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.
- Type: integer
- 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.
- Deze parameter is vereist.
- Separate values with | or alternative.
- Maximumaantal waarden is 50 (of 500 voor cliƫnten waaraan hogere limieten zijn toegestaan).
- 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.
- Separate values with | or alternative.
- Maximumaantal waarden is 50 (of 500 voor cliƫnten waaraan hogere limieten zijn toegestaan).
- Standaard: infinite
- reason
Reden voor instellen of opheffen van de beveiliging.
- Default: (empty)
Change tags to apply to the entry in the protection log.
- Waarden (gescheiden met | of alternatief):
- 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
- Verouderd.
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.
- Een van de volgende waarden: nochange, preferences, unwatch, watch
- Standaard: preferences
- token
A "csrf" token retrieved from action=query&meta=tokens
- Deze parameter is vereist.
- Een pagina beveiligen.
- api.php?action=protect&title=Hoofdpagina&token=123ABC&protections=edit=sysop|move=sysop&cascade=&expiry=20070901163000|never [in de sandbox openen]
- Unprotect a page by setting restrictions to all (i.e. everyone is allowed to take the action).
- api.php?action=protect&title=Hoofdpagina&token=123ABC&protections=edit=all|move=all&reason=Lifting%20restrictions [in de sandbox openen]
- Unprotect a page by setting no restrictions.
- api.php?action=protect&title=Hoofdpagina&token=123ABC&protections=&reason=Lifting%20restrictions [in de sandbox openen]