Community articleRestoring a file from the trash
Added by IBM contributorIBM on June 23, 2014
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

Restore a file to a document library 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.
 

  • {userid} is the value of the <snx:userid> of the person who owns the file. See Searching 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.


Input


None.

Output


An updated file Atom entry document.

Input
Method URI Description
PUT /files/basic/api/userlibrary/{userid}/view/recyclebin/{document-id}/entry Restore a file from the specified person's recycle bin.
PUT /files/basic/api/myuserlibrary/view/recyclebin/{document-id}/entry Restore a file from your recycle bin.
Content Type: application/atom+xml
Name Type Optional Description
userid
string No {userid} is the value of the <snx:userid> of the person who owns the file. See Searching Profiles for information about how to determine a person's user ID.
document-id
string No {document-id} is the value of the <td:uuid> or <td:label> of the file and can be found in the file's Atom document. If you specify the document by label, you must also provide the identifier=label parameter as part of the request.
Name Type Optional Description
undelete
boolean No 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.
Output
Content Type: application/atom+xml
Code Description
204
Indicates that the file was successfully restored. If an error occurs, this header contains one of the error codes.
401
Unauthorized.
404
Not Found.