MindTouch Developer Center > MindTouch Deki > API Reference > GET:archive/pages/{pageid}/contents

GET:archive/pages/{pageid}/contents

Overview

public. Retrieve the contents of a deleted page for previewing

Uri Parameters
Name Type Description
pageid string An integer page ID of a deleted page
Query Parameters

None

Return Codes
Name Value Description
Forbidden 403 Administrator access is required
Ok 200 The request completed successfully

Message Format

Output:

<content type="{contenttype}">    
  <head>{text}</text>   
  <body>{text}</body>   
  <body target="{text}">{text}</body>  
  ...
  <tail>{text}</tail>   
</content>

Implementation Notes

This feature uses the ViewNoExecute render mode, which retrieves the contents used to perform a diff.  This mode is identical to View, except that functions are not evaluated.

When a page is deleted, the page and all files on it are moved into the archive. A page is never permanently deleted; it will remain in the archive until it is restored (POST:archive/pages/{pageid}/restore). While a page is in the archive, it cannot be modified.

Use GET:archive/pages to retrieve a list of pages currently in the archive.

Code Samples

The following code example retrieves a preview of deleted page ID 10168:

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

Sample response:

- <content type="application/x.deki0702+xml">
     <body>
        <a name="Section1"></a>
        <h2>Section1</h2> 
        <p>section1 text</p>
    </body>     
    <body target="toc">
        <ol style="list-style-type:none; margin-left:0px; padding-left:0px;">
            <li>1. 
                <a href="http://deki-hayes/Page_Title#Section1" rel="internal">Section1</a>
            </li>
        </ol>
    </body> 
  </content>

    

Tag page
You must login to post a comment.
Powered by MindTouch Deki Enterprise Edition v.8.08 RC2