MindTouch Developer Center > MindTouch Deki > API Reference > POST:archive/files/restore/{fileid}

POST:archive/files/restore/{fileid}

Overview

public. Restores a deleted file back to its page

Uri Parameters
NameTypeDescription
fileidintidentifies a file by ID
Query Parameters
NameTypeDescription
tostring?Optional restore-to page to override a removed file's original parent id
Return Codes
NameValueDescription
BadRequest400Invalid input parameter or request body
Forbidden403Administrator access is required
NotFound404Requested file could not be found in the archive
Ok200The request completed successfully

Message Format

None

Implementation Notes

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

When a file is restored, it is moved from the file archive to the destination page.  If the caller does not specify a destination page, the file is restored to its original page.  A placeholder page will be created if the original page no longer exists.

Code Samples

The following code example restores file with ID 456 to the home page:

Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
p.At("archive", "files", "restore", "456").With("to", "home").Post();
Tag page
You must login to post a comment.
Powered by MindTouch Deki Enterprise Edition v.8.08 RC2