apidocs

RestoreRecycleBinItem API

Restores a single document or folder from the Recycle Bin back into the infoRouter folder hierarchy. The item is identified by its Handler value, which is obtained from GetRecycleBinContent. Optionally, a different target folder can be specified; if omitted the item is restored to its original location. Use this API to recover accidentally deleted content programmatically.

Endpoint


/srv.asmx/RestoreRecycleBinItem

Methods

Parameters

Parameter Type Required Description
AuthenticationTicket string Yes Authentication ticket obtained from AuthenticateUser.
ItemHandler string Yes Handler string identifying the recycled item to restore. Obtained from the Handler attribute returned by GetRecycleBinContent. Format: D{id} for a document (e.g. D9871), F{id} for a folder (e.g. F4312). Case-insensitive.
RestorePath string No Full infoRouter path of the target folder to restore the item into (e.g. /Finance/Archive). If omitted or empty, the item is restored to its original location at the time it was deleted. The target folder must already exist and the caller must have create rights within it.

Response

Success Response


<response success="true" error="" />

Error Response


<response success="false" error="Access denied." />


Required Permissions


Example

GET Request -“ restore to original location


GET /srv.asmx/RestoreRecycleBinItem

  ?AuthenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301

  &ItemHandler=D9871

HTTP/1.1

GET Request -“ restore to an alternate location


GET /srv.asmx/RestoreRecycleBinItem

  ?AuthenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301

  &ItemHandler=D9871

  &RestorePath=/Finance/Archive

HTTP/1.1

POST Request


POST /srv.asmx/RestoreRecycleBinItem HTTP/1.1

Content-Type: application/x-www-form-urlencoded



AuthenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301

&ItemHandler=D9871

&RestorePath=/Finance/Archive

SOAP Request


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"

               xmlns:tns="http://tempuri.org/">

  <soap:Body>

    <tns:RestoreRecycleBinItem>

      <tns:AuthenticationTicket>3f2504e0-4f89-11d3-9a0c-0305e82c3301</tns:AuthenticationTicket>

      <tns:ItemHandler>D9871</tns:ItemHandler>

      <tns:RestorePath>/Finance/Archive</tns:RestorePath>

    </tns:RestoreRecycleBinItem>

  </soap:Body>

</soap:Envelope>


Notes



Error Codes

Error Description
[900] Authentication failed Invalid or missing authentication ticket.
[901] Session expired or Invalid ticket The ticket has expired or does not exist.
Invalid ItemHandler The ItemHandler string is empty, cannot be parsed, or refers to an unsupported object type.
Document is no longer in the recycle bin. The document has already been purged or previously restored.
Folder is no longer in the recycle bin. The folder has already been purged or previously restored.
Access denied. The calling user did not delete this item and is not a system administrator.
The original location no longer exists. RestorePath was not specified and the original folder has since been deleted.
Target folder not found The specified RestorePath does not resolve to an existing folder.
Insufficient rights The caller does not have create rights in the target restore folder.
SystemError:... An unexpected server-side error occurred.