Overview

public. Move page to a new location

Uri Parameters
NameTypeDescription
pageidstringeither an integer page ID, "home", or "=" followed by a double uri-encoded page title
Query Parameters
NameTypeDescription
redirectsint?If zero, do not follow page redirects.
tostringnew page title
Return Codes
NameValueDescription
BadRequest400Invalid input parameter or request body
Conflict409Page move would conflict with an existing page
Forbidden403Update access to the page is required
NotFound404Requested page could not be found
Ok200The request completed successfully

Message Format

Output:

<pages.moved count="{int}">
    <page id="{int}" href="{uri}">
        <title>{text}</title> 
        <path>{text}</path> 
    </page>
    ...
</pages.moved>

Implementation Notes

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.

Code Samples

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>
Tag page
You must login to post a comment.
Powered by MindTouch Deki Enterprise Edition v.8.08 RC2