API:履歴の統合

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page API:Mergehistory and the translation is 38% complete.

Other languages:
English • ‎dansk • ‎polski • ‎ไทย • ‎中文 • ‎日本語

トークン

To merge a page, an edit token is required.

ページの統合

Pages can be merged with action=mergehistory.

パラメーター

  • from: Title of the page from which history will be merged. fromid と同時には使用できません。
  • fromid: Page ID of the page from which history will be merged. from と同時には使用できません。
  • to: Title of the page to which history will be merged. toid と同時には使用できません。
  • toid: Page ID of the page to which history will be merged. 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: Reason for the history merge (optional).
  • token: A csrf token.

In this example, all parameters are passed in a GET request just for the sake of simplicity. However, action=mergehistory requires POST requests; GET requests will cause an error.

Merge the entire history of Oldpage into Newpage.

Merge the page revisions of Oldpage dating up to 2015-12-31T04:37:41Z into Newpage.

起こりうるエラー

All errors are formatted as:

<error code="code" info="info">





action=mergehistory

(main | mergehistory)
  • This module requires read rights.
  • This module requires write rights.
  • This module only accepts POST requests.
  • Source: MediaWiki
  • License: GPL-2.0-or-later

Merge page histories.

Parameters:
from

Title of the page from which history will be merged. Cannot be used together with fromid.

fromid

Page ID of the page from which history will be merged. Cannot be used together with from.

Type: integer
to

Title of the page to which history will be merged. Cannot be used together with toid.

toid

Page ID of the page to which history will be merged. Cannot be used together with to.

Type: integer
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.

Type: timestamp (allowed formats)
reason

Reason for the history merge.

Default: (empty)
token

A "csrf" token retrieved from action=query&meta=tokens

This parameter is required.