Skip to main content
NICE CXone Expert
Expert Success Center

archive/pages/{pageid}/contents (GET)

Overview

Retrieve the contents of a deleted page for previewing

  • REST Method: GET
  • Method Access: public

Uri Parameters

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

Query Parameters

Name Type Description
authenticate bool? Force authentication for request (default: false)

Return Codes

Name Value Description
OK 200 The request completed successfully
Forbidden 403 Administrator access is required

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.

C# Code Sample: Retrieve Archived Page Content

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

Sample Code

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 from executing Code

<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>

Implementation notes 

Add notes about requirements or config values

Curl Code Sample: Retireve Archived Page Content

The following command retrieves the contents of an archived page with page.archive ID = 1:

Sample Code

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

Sample Response

page.archiveID = 588

<content type="text/html">
  <body><span class="plain">{{wiki.localize('System.API.page-placeholder-for-children')}}</span></body>
  <body target="toc"><em>No headers</em></body>
</content>

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.

Archived Pages

To view a list of archived pages, follow the instructions here.
  • Was this article helpful?