MediaWiki API 說明
此頁為自動產生的 MediaWiki API 說明文件頁面。
說明文件與範例:https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page
action=mergehistory
(main | mergehistory)
- 此模組需要讀取權限。
- 此模組需要寫入權限。
- 此模組僅接受 POST 請求。
- 來源:MediaWiki
- 授權條款:GPL-2.0-or-later
合併頁面歷史
具體參數:
其他通用參數可用。
- from
要合併歷史的頁面標題。不能與 fromid 一起使用。
- fromid
要合併歷史的頁面之頁面 ID。不能與 from 一起使用。
- 類型:整數
- to
要合併歷史的頁面標題。不能與 toid 一起使用。
- toid
要合併歷史的頁面之頁面 ID。不能與 to 一起使用。
- 類型:整數
- timestamp
要從來源頁面歷史裡移動至目標頁面歷史之修訂的時間戳記。若省略掉的話,來源頁面的整個頁面歷史將會合併至目標頁面。
- reason
合併歷史的原因。
- 預設值:(空)
- starttimestamp
Timestamp from which revisions will be moved from the source page's history to the destination page's history. If omitted, all revisions before the timestamp parameter (or the entire history if neither are specified) will be merged into the destination page. May specify "timestamp|revid" to split two revisions with the same timestamp.
- token
自 action=query&meta=tokens 接收的「csrf」權杖。
- 此為必填參數。
範例:
- 將Oldpage的整個歷史合併至Newpage。
- api.php?action=mergehistory&from=Oldpage&to=Newpage&token=123ABC&reason=Reason [在沙盒中開啟]
- 將Oldpage直至2015-12-31T04:37:41Z的頁面修訂版本合併至Newpage。
- api.php?action=mergehistory&from=Oldpage&to=Newpage&token=123ABC&reason=Reason×tamp=2015-12-31T04%3A37%3A41Z [在沙盒中開啟]