public. Restore all revisions of a given page
| Name | Type | Description |
| pageid | int | An integer page ID from GET: archive/pages |
| Name | Type | Description |
| authenticate | bool? | Force authentication for request (default: false) |
| reason | string? | Reason for reverting |
| to | string | new page title |
| Name | Value | Description |
| Conflict | 409 | A title with the same path already exists. To restoring to a different path with '?to=' |
| Forbidden | 403 | Administrator access is required |
| NotFound | 404 | Unable to find the page to delete |
| Ok | 200 | The request completed successfully |
Output:
<pages.restored>
<page id="{id}" href="{uri}">
<title>{text}</title>
<path>{text}</path>
</page>
</pages.restored>
Use GET:archive/pages to retrieve a list of pages currently in the archive.
When a page is restored, it is moved from the page archive to the specified location. If a new page already exists at this location, the restore will fail until this page has been removed or renamed.
Note that this feature does not restore files attached to the specified page.
The following code example restores archived page ID 10168 to the title RestoredPage:
Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("archive", "pages", "10168", "restore").With("to", "RestoredPage").Post();
Sample response indicating that the page was restored:
<pages.restored>
<page id="10168" href="http://deki-hayes/@api/deki/pages/10168">
<title>RestoredPage</title>
<path>RestoredPage</path>
</page>
</pages.restored>