API:Rollback/ja

巻き戻し
Rolling back a page means undoing the last series of edits by one user. In other words, rollback keeps undoing revision after revision until it encounters one made by someone different. This functionality is identical to the one provided by the [ ] links in the graphical interface. The rollback revision will be marked as minor. Optionally, both the rollback and the edits being rolled back can be marked as bot, which hides them from Special:RecentChanges by default.

トークン
巻き戻しを行うためには、巻き戻しトークンが必要です. MediaWiki 1.24 以上を使っているなら、巻き戻しトークンを取得するために action=query&meta=tokens&type=rollback を使用することができます.

MediaWiki 1.23 以前の場合は、以下の説明に従ってください:

Unlike most other tokens, rollback tokens aren't universal: they're not only different for every login, but also depend on the title of the page and the name of the user whose edits are to be rolled back. 巻き戻しトークンは以下のようにして取得できます:

ページの巻き戻し
Pages can be rolled back with action=rollback.

パラメーター

 * : 巻き戻しを行うページ. pageid とは同時に使用できません.
 * : 巻き戻しを行うページID. titleとは同時に使用できません.
 * : 以前のリクエストで取得したトークン. '+' を '%2B' にurlエンコードすることを忘れずに.
 * : The author of the last revision.
 * : 編集要約 (任意). 設定しない場合は既定の要約文が使われます.
 * : If set, both the rollback and the revisions being rolled back will be marked as bot edits.
 * : Unconditionally add or remove the page from your watchlist, use preferences or do not change watch. One value among: watch, unwatch, preferences, nochange.

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

Returned fields

 * : The revision ID of the rollback.
 * : The revision ID of the first (most recent) revision that was rolled back.
 * : The revision ID of the last (oldest) revision that was rolled back.

If rolling back wouldn't change the page, no new revision is made. In this case,  will be equal to.

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