Помощ за МедияУики API

Това е автоматично генерирана страница за документация на МедияУики API.

Документация и примери: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

action=changecontentmodel

(main | changecontentmodel)
  • This module requires read rights.
  • This module requires write rights.
  • This module only accepts POST requests.
  • Source: MediaWiki
  • License: GPL-2.0-or-later

Change the content model of a page

Parameters:
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.

Стойности (разделени с | или алтернативния разделител):
model

Content model of the new content.

This parameter is required.
Една от следните стойности: css, javascript, json, text, wikitext
bot

Mark the content model change with a bot flag.

Type: boolean (details)
token

Маркер „csrf“, получен от action=query&meta=tokens

This parameter is required.
Пример:
Change the main page to have the text content model
api.php?action=changecontentmodel&title=Main Page&model=text&token=123ABC [open in sandbox]
Взето от „http:///Специални:ApiHelp“.