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:

1<content type="{contenttype}">   
2  <head>{text}</text>  
3  <body>{text}</body>  
4  <body target="{text}">{text}</body
5  ...
6  <tail>{text}</tail>  
7</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

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

Sample Response from executing Code

01<content type="application/x.deki0702+xml">
02     <body>
03        <a name="Section1"></a>
04        <h2>Section1</h2>
05        <p>section1 text</p>
06    </body>    
07    <body target="toc">
08        <ol style="list-style-type:none; margin-left:0px; padding-left:0px;">
09            <li>1.
10                <a href="http://deki-hayes/Page_Title#Section1" rel="internal">Section1</a>
11            </li>
12        </ol>
13    </body>
14  </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 Response

page.archiveID = 588

1<content type="text/html">
2  <body><span class="plain">{{wiki.localize('System.API.page-placeholder-for-children')}}</span></body>
3  <body target="toc"><em>No headers</em></body>
4</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?