Was this page helpful?

Retrieve Page Revisions

    Description of the code sample

    The following code example retrieves the revisions of the page called "Page Title":

    Sample Code

    Plug p = Plug.New("http://deki-hayes/@api/deki");
    p.At("users", "authenticate").WithCredentials("admin", "password").Get();
    p.At("pages", "=Page_Title", "revisions").Get();

    Sample Response from executing Code

    Sample response indicating that there is one revision:

    <pages>
        <page id="31" revision="1" href="http://deki-hayes/@api/deki/pages/31/revisions?revision=1&redirects=0">
            <title>Page Title</title> 
            <path>Page_Title</path> 
            <date.edited>2007-08-29T23:03:18Z</date.edited> 
            <user.author id="1" href="http://deki-hayes/@api/deki/users/1">
                <nick>Admin</nick> 
                <username>Admin</username> 
                <email>admin@mindtouch.com</email> 
            </user.author>
            <description>2 words added</description> 
            <contents type="application/x.deki0702+xml" href="http://deki-hayes/@api/deki/pages/31/revisions/contents?revision=1&redirects=0" /> 
        </page>
    </pages>

    Implementation notes 

    Add notes about requirements or config values

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

    Copyright © 2011 MindTouch, Inc. Powered by