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}" > |
4 | < body target = "{text}" >{text}</ body > |
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
2 | p.At( "users" , "authenticate" ).WithCredentials( "admin" , "password" ).Get(); |
3 | p.At( "archive" , "pages" , "10168" , "contents" ).Get(); |
Sample Response from executing Code
01 | < content type = "application/x.deki0702+xml" > |
03 | < a name = "Section1" ></ a > |
08 | < ol style = "list-style-type:none; margin-left:0px; padding-left:0px;" > |
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 > |
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.