עזרה של MediaWiki API
זהו דף תיעוד של API שנוצר באופן אוטומטי.
תיעוד ודוגמאות: https://www.mediawiki.org/wiki/API
action=import
(main | import)
- יחידה זו דורשת הרשאות קריאה.
- יחידה זו דורשת הרשאות כתיבה.
- יחידה זו מקבלת רק בקשות POST.
Import a page from another wiki, or 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
Import summary.
- xml
קובץ XML שהועלה.
- חייב להישלח (posted) בתור העלאת קובץ באמצעות 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.
- templates
For interwiki imports: import all included templates as well.
- namespace
For interwiki imports: import to this namespace.
- ערך אחד: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
- rootpage
Import as subpage of this page.
- token
אסימון "csrf" אוחזר מ־action=query&meta=tokens
- פרמטר זה נדרש.
דוגמה:
- Import meta:Help:Parserfunctions to namespace 100 with full history.
- api.php?action=import&interwikisource=meta&interwikipage=Help:ParserFunctions&namespace=100&fullhistory=&token=123ABC