Was this page helpful?

POST:pages/{pageid}/move

    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
    authenticatebool?Force authentication for request (default: false)
    namestring?Move the page to the given name while keeping it under the same parent page
    parentidint?Relocate the page under a given parent page
    redirectsint?If zero, do not follow page redirects.
    titlestring?Set the title of the page. The name of a page is also modified unless it's provided
    tostring?new page location including the path and name of the page
    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

    C# Samples

     

    Curl Samples

     

    PHP Samples

     

    Other Code Samples

     

    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by