MediaWiki API súgó
Ez egy automatikusan generált MediaWiki-API-dokumentációs lap.
Dokumentáció és példák: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=changecontentmodel
(main | changecontentmodel)
- Ez a modul olvasási jogot igényel.
- Ez a modul írási jogot igényel.
- Ez a modul csak POST kéréseket fogad el.
- Forrás: MediaWiki
- Licenc: GPL-2.0-or-later
Change the content model of a page
Paraméterek:
- 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 
- tags
- Change tags to apply to the log entry and edit. 
- Értékek (elválasztó: | vagy más):
- model
- Content model of the new content. 
- This parameter is required.
- A következő értékek egyike: css, javascript, json, text, wikitext
- bot
- Mark the content model change with a bot flag. 
- Típus: logikai (részletek)
- token
- Egy „csrf” token, az action=query&meta=tokens kéréssel lekérve 
- This parameter is required.
Példa:
- Change the main page to have the textcontent model
- api.php?action=changecontentmodel&title=Main Page&model=text&token=123ABC [megnyitás a homokozóban]