Was this page helpful?

Retrieve List of Archived Pages

    Description of the code sample

    The following command retrieves a list of all deleted pages:

    Sample Code

    curl -u admin:password -i http://mindtouch.address/@api/deki/archive/pages

    Sample Response from executing Code

    Sample response with 129 deleted pages (shows only first archived one, page.archiveID = 588):

    <pages.archive querycount="129">
      <page.archive id="588" href="http://192.168.59.128/@api/deki/archive/pages/588/info">
        <title>Test</title>
        <path>Test</path>
        <contents type="application/x.deki0805+xml" href="http://192.168.59.128/@api/deki/archive/pages/588/contents"/>
        <user.deleted id="88" href="http://192.168.59.128/@api/deki/users/88">
          <nick>test6</nick>
          <username>test6</username>
          <email hidden="true"/>
          <hash.email>989d7c3b24422e0f2ab2da41e3a91434</hash.email>
          <uri.gravatar>
    http://www.gravatar.com/avatar/989d7c3b24422e0f2ab2da41e3a91434
    </uri.gravatar>
        </user.deleted>
        <date.deleted>2010-01-26T22:40:57Z</date.deleted>
        <subpages count="0" href="http://192.168.59.128/@api/deki/archive/pages/588/subpages"/>
      </page.archive>
      <page.archive id="587" href="http://192.168.59.128/@api/deki/archive/pages/587/info">
        <title>Test</title>
        <path>Test</path>
        <contents type="application/x.deki0805+xml" href="http://192.168.59.128/@api/deki/archive/pages/587/contents"/>
        <user.deleted id="1" href="http://192.168.59.128/@api/deki/users/1">
          <nick>Admin</nick>
          <username>Admin</username>
          <email hidden="true"/>
          <hash.email>64e1b8d34f425d19e1ee2ea7236d3028</hash.email>
          <uri.gravatar>
    http://www.gravatar.com/avatar/64e1b8d34f425d19e1ee2ea7236d3028
    </uri.gravatar>
        </user.deleted>
        <date.deleted>2010-01-26T22:29:59Z</date.deleted>
        <subpages count="0" href="http://192.168.59.128/@api/deki/archive/pages/587/subpages"/>
      </page.archive>
      
      ...
    
    </pages.archive>

    Implementation notes 

    curl flags

    -u
    Provides external user authentication.
    -i
    Outputs the HTTP response headers. Useful for debugging.

    Permissions

    ADMIN permission is required to execute above command.
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by