MediaWiki API 幫助
這是自動生成的MediaWiki API文檔頁面。
文檔和例子:https://www.mediawiki.org/wiki/API:Main_page/zh
action=mergehistory
(main | mergehistory)
- 此模塊需要讀取權限。
- 此模塊需要寫入權限。
- 此模塊只允許POST請求。
- 來源:MediaWiki
- 許可協議:GPL-2.0+
合并頁面歷史。
參數:
- from
將被合并歷史的頁面的標題。不能與fromid一起使用。
- fromid
將被合并歷史的頁面的頁面ID。不能與from一起使用。
- 類型:整數
- to
將要合并歷史的頁面的標題。不能與toid一起使用。
- toid
將要合并歷史的頁面的頁面ID。不能與to一起使用。
- 類型:整數
- timestamp
Timestamp up to which revisions will be moved from the source page's history to the destination page's history. If omitted, the entire page history of the source page will be merged into the destination page.
- 類型:時間戳(允許格式)
- reason
歷史合并的原因。
- 默認:(空)
- 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 [在沙盒中打開]