Restore a file from the trash
Restore a file to a document library from the trash.You must authenticate this request. The requestor must have permission to restore the specified file.
Table 1. Atom API request details
Method URI Output representation Description PUT /basic/api/userlibrary/{userid}/recyclebin/{document-id}/entry file Atom document Restore a file from the specified person's recycle bin. PUT /basic/api/myuserlibrary/recyclebin/{document-id}/entry file Atom document Restore a file from your recycle bin.
- {userid} is the value of the <snx:userid> of the person who owns the file. See Search Profiles for information about how to determine a person's user ID.
- {document-id} is the value of the <td:uuid> of the file and can be found in the file's Atom document.
You can use this input parameter with the PUT request.
Table 2. Input parameters
Parameter Description undelete Specifies whether to restore the file to its original location. This parameter takes a Boolean value of either true or false. If you specify true, the file is restored. If you specify false, no action is performed. The default value is false.
Input
None.
Output
An updated file Atom entry document.Returned HTTP Headers
HTTP/1.1 204 No Content
Indicates that the file was successfully restored. If an error occurs, this header contains one of the error codes.
- HTTP/1.1 401 Unauthorized
- HTTP/1.1 404 Not Found
Parent topic
Work with files in the trash
});