Restoring a file from the trash
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 30, 2015
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.
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.
Input
Method URI Description
PUT /files/{auth}/api/userlibrary/{userid}/view/recyclebin/{document-id}/entry Restore a file from someone else's recycle bin.
PUT /files/{auth}/api/myuserlibrary/view/recyclebin/{document-id}/entry Restore a file from the user's recycle bin (My 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.
auth
enumerated No The authorization protocol being used by your application to access Connections Cloud.
Authorized values:
  • basic
  • oauth
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.
Name Type Optional Description
Authorization
enumerated No The authentication mechanism selected by your application to access the API.
Basic is the Base64 encoding of the IBM Connections Cloud username and password: Base64(username:password). For example, Base64(twatson@us.ibm.com:password).
Bearer is the oauth 2.0 access token that is generated when the user grants your application access to IBM Connections Cloud services.
See the reference topic "OAuth 2.0 APIs for web server flow" for more information.
Authorized values:
  • bearer
  • basic
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.