public. Move page to a new location
| Name | Type | Description |
| pageid | string | either an integer page ID, "home", or "=" followed by a double uri-encoded page title |
| Name | Type | Description |
| redirects | int? | If zero, do not follow page redirects. |
| to | string | new page title |
| Name | Value | Description |
| BadRequest | 400 | Invalid input parameter or request body |
| Conflict | 409 | Page move would conflict with an existing page |
| Forbidden | 403 | Update access to the page is required |
| NotFound | 404 | Requested page could not be found |
| Ok | 200 | The request completed successfully |
Output:
<pages.moved count="{int}">
<page id="{int}" href="{uri}">
<title>{text}</title>
<path>{text}</path>
</page>
...
</pages.moved>A page cannot be moved to a destination that already exists, is a descendant, or has a protected title (ex. Special:xxx, User:, Template:).
When a page is moved, subpages under the specified page are also moved. For each moved page, the system automatically creates an alias page that redirects from the old to the new destination.
The following code example renames "Subpage 1" to "New Subpage 1":
Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("pages", "=Page_Title%252fSubpage_1", "move").With("to", "Page_Title/New_Subpage_1").Post(); Sample response indicating that the move was successful:
<pages.moved count="1">
<page id="83" href="http://deki-hayes/@api/deki/pages/83">
<title>New Subpage 1</title>
<path>Page_Title/New_Subpage_1</path>
</page>
</pages.moved>