API:Rollback/zh

POST request to revert the last series of edits made by one user to a given page.



-{zh-hans:示例; zh-hant:範例;}-
发出任何POST请求都是一个多步骤的过程：

 使用中描述的方法之一登录.  获取.

  Send a POST request, with the CSRF token, to take action on a page and in this process gain  rights to the given page:

 GET a rollback token:  If your wiki is using MediaWiki 1.24+, follow these instructions:

  Rollback tokens aren't universal: they are 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. 对于MediaWiki 1.23及之前的版本，可以通过如下的步骤：

   </ol>

<span id="POST_request">

POST请求
Send a POST request, with a rollback token to revert a user's edits to the Sandbox page.

回应
The Response section below is for the final POST request, to revert the edits to the Sandbox page.

回应中的修订ID为：
 *   - 回退创建的新修订版的ID.
 *   - 正在回退的最新修订版的ID. 回退之前，这是当前版本.
 *   - 回退恢复的修订版本的ID. 这是已回退的最新修订版本.

<span id="Sample_code">

权限
Rollback requires both the  and the   right on the target page; currently, this means that OAuth consumers, bot passwords etc. require both the   and the   grant –   alone is not enough!

<span id="Possible_errors">

可能的错误
In addition to the usual stuff:

<span id="Parameter_history">

参数历史

 * v1.24: 启用
 * v1.27: 启用
 * v1.17: 启用

<span id="Additional_notes">

补充资料

 * 可选的是，回退与与被回退的编辑均可被标记为机器人操作，可在最近更改中默认不显示.

<span id="See_also">

參見

 * - 编辑页面
 * - 包含对编辑页面有用的链接
 * - Has more details on using tokens to log in or make POST requests.
 * - A deprecated API, distinct from, for requesting tokens in earlier versions of MediaWiki.
 * - Rolls back files to an earlier state.
 * - Deletes and restores revisions to a page.
 * - Allows you to diff between edits on a page.