Справка MediaWiki API

This is an auto-generated MediaWiki API documentation page.

Documentation and examples: https://www.mediawiki.org/wiki/API

action=import

(main | import)
  • Этот модуль требует прав на чтение.
  • Этот модуль требует права на запись.
  • Этот модуль принимает только Post-запросы.
  • Источник: MediaWiki
  • Лицензия: GPL-2.0+

Import a page from another wiki, or from an XML file.

Note that the HTTP POST must be done as a file upload (i.e. using multipart/form-data) when sending a file for the xml parameter.

Параметры:
summary

Описание записи журнала импорта.

xml

Загруженный XML-файл.

Must be posted as a file upload using multipart/form-data.
interwikisource

For interwiki imports: wiki to import from.

Одно из следующих значений:
interwikipage

For interwiki imports: page to import.

fullhistory

For interwiki imports: import the full history, not just the current version.

Тип: двоичный (details)
templates

For interwiki imports: import all included templates as well.

Тип: двоичный (details)
namespace

Import to this namespace. Cannot be used together with rootpage.

Одно из следующих значений: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 828, 829
rootpage

Import as subpage of this page. Cannot be used together with namespace.

tags

Change tags to apply to the entry in the import log and to the null revision on the imported pages.

Значения (разделённые с помощью | или альтернативного варианта):
token

A "csrf" token retrieved from action=query&meta=tokens

Это обязательный параметр.
Пример:
Импортировать meta:Help:ParserFunctions с полной историей в пространство имён 100.
api.php?action=import&interwikisource=meta&interwikipage=Help:ParserFunctions&namespace=100&fullhistory=&token=123ABC [open in sandbox]