MediaWiki API ヘルプ
このページは自動生成された MediaWiki API の説明文書ページです。
説明文書と例: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=changecontentmodel
(main | changecontentmodel)
- このモジュールは読み取りの権限を必要とします。
- このモジュールは書き込みの権限を必要とします。
- このモジュールは POST リクエストのみを受け付けます。
- ソース: MediaWiki
- ライセンス: GPL-2.0-or-later
ページのコンテンツモデルを変更します。
パラメーター:
その他一般パラメーターが利用可能です。
- 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. 
- 型: 整数
- summary
- Edit summary and log entry reason 
- tags
- Change tags to apply to the log entry and edit. 
- 値 (| または別の文字列で区切る):
- model
- 新しいコンテンツのコンテンツモデル。 
- この変数は必須です。
- 値 (次の値のいずれか1つ): css、javascript、json、text、wikitext
- bot
- Mark the content model change with a bot flag. 
- 型: 真偽値 (詳細)
- token
- action=query&meta=tokens から取得した「csrf」トークン 
- この変数は必須です。
例:
- Change the main page to have the textcontent model
- api.php?action=changecontentmodel&title=Main Page&model=text&token=123ABC [サンドボックスで開く]