API:Import/ja

POST request to import a page from another wiki (transwikiing) or from an xml file.



Import process
Importing a page is a multi-step process:   Log in using one of the methods described in.   GET a. This token is the same for all pages but changes at every login.

  Send a POST request with the CSRF token in order to import the page.  

The code samples below cover the third step in detail.

Example 1: Import a page from another wiki


レスポンス


Example 2: Import a page by uploading its xml dump


レスポンス


サンプル コード


起こりうるエラー
In addition to :



パラメーターの履歴

 * v1.29:  を導入しました
 * v1.20:  を導入しました



追加的な注記
MediaWiki is looking for a boundary in the header but cannot find it. Similarly, parameters marked with  are only used when importing from another wiki (transwiki). If the list of possible values for this parameter is empty, interwiki imports are disabled.
 * This module cannot be used as a.
 * rights are required in order to upload an xml file, while  rights are required for interwiki imports.
 * If you get a  error, it is because you sent it url-encoded but claimed it would be multipart/form-data.
 * Parameters marked with  are only used when importing an uploaded XML file.
 * The possible values for the  parameter differ per wiki, see.

<span id="See_also">

関連項目

 * Special:Export - Export the text and editing history of a particular page or set of pages wrapped in some XML.
 * through the API.
 * - Upload a file.