Nápověda k MediaWiki API
Toto je automaticky generovaná dokumentační stránka k MediaWiki API.
Dokumentace a příklady: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=changecontentmodel
(main | changecontentmodel)
- Tento modul vyžaduje oprávnění ke čtení.
- Tento modul vyžaduje oprávnění k zápisu.
- Tento modul přijímá pouze požadavky POST.
- Zdroj: MediaWiki
- Licence: GPL-2.0-or-later
Change the content model of a page
Parametry:
Other general parameters are available.
- title
- Title of the page to change the contentmodel of. Cannot be used together with pageid. 
- pageid
- Page ID of the page to change the contentmodel of. Cannot be used together with title. 
- Type: integer
- summary
- Edit summary and log entry reason 
- Change tags to apply to the log entry and edit. 
- Hodnoty (oddělené | nebo alternativou.):
- model
- Content model of the new content. 
- This parameter is required.
- Jedna z následujících hodnot: Campaign, GadgetDefinition, Scribunto, css, javascript, json, text, wikitext
- bot
- Mark the content model change with a bot flag. 
- Type: boolean (details)
- token
- Token typu „csrf“ získaný pomocí action=query&meta=tokens. 
- This parameter is required.
Příklad:
- Change the main page to have the textcontent model
- api.php?action=changecontentmodel&title=Main Page&model=text&token=123ABC [otevřít v pískovišti]