MediaWiki API help
This is an auto-generated MediaWiki API documentation page.
Documentation and examples: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=import
- This module requires read rights.
- This module requires write rights.
- This module only accepts POST requests.
- Source: MediaWiki
- License: GPL-2.0-or-later
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
Log entry import summary.
- xml
Uploaded XML file.
- Must be posted as a file upload using multipart/form-data.
- interwikiprefix
For uploaded imports: interwiki prefix to apply to unknown usernames (and known users if assignknownusers is set).
- interwikisource
For interwiki imports: wiki to import from.
- One of the following values:
- interwikipage
For interwiki imports: page to import.
- fullhistory
For interwiki imports: import the full history, not just the current version.
- Type: boolean (details)
- templates
For interwiki imports: import all included templates as well.
- Type: boolean (details)
- namespace
Import to this namespace. Cannot be used together with rootpage.
- One of the following values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 102, 103, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 274, 275, 710, 711, 828, 829, 2300, 2301, 2302, 2303, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, 3039, 3040, 3041, 3042, 3043
- assignknownusers
Assign edits to local users where the named user exists locally.
- Type: boolean (details)
- 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.
- Values (separate with | or alternative):
- token
A "csrf" token retrieved from action=query&meta=tokens
- This parameter is required.
- Import meta:Help:ParserFunctions to namespace 100 with full history.
- api.php?action=import&interwikisource=meta&interwikipage=Help:ParserFunctions&namespace=100&fullhistory=&token=123ABC [open in sandbox]