Overview
public. Restores a deleted file back to its page
Uri Parameters
| Name | Type | Description |
| fileid | int | identifies a file by ID |
Query Parameters
| Name | Type | Description |
| to | string? | Optional restore-to page to override a removed file's original parent id |
Return Codes
| Name | Value | Description |
| BadRequest | 400 | Invalid input parameter or request body |
| Forbidden | 403 | Administrator access is required |
| NotFound | 404 | Requested file could not be found in the archive |
| Ok | 200 | The request completed successfully |
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();