apidocs

GetRecycleBinContent API

Returns the list of all documents and folders currently in the Recycle Bin of the authenticated user. Each item includes its original path, deletion date, size, the user who deleted it, and a handler value that can be used with PurgeRecycleBinItem or RestoreRecycleBinItem. Use this API to inspect the contents of a user’s Recycle Bin before deciding whether to restore or permanently delete items.

Endpoint


/srv.asmx/GetRecycleBinContent

Methods

Parameters

Parameter Type Required Description
AuthenticationTicket string Yes Authentication ticket obtained from AuthenticateUser. The recycle bin returned is always that of the user who owns this ticket.

Response

Success Response

Returns a <response> element with success="true" containing zero or more <document> and <folder> child elements, one per recycled item.


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

  <document

    Name="Q1-2024-Report.pdf"

    DateDeleted="2024-06-15T10:23:45.000Z"

    TotalSize="204800"

    OriginalFolderId="4521"

    DeletePath="/Finance/Reports/Q1-2024-Report.pdf"

    DeletedById="12"

    DeletedByName="jsmith"

    RecycledItemStatusId="0"

    RecycledItemStatus="In User Recycle Bin"

    Handler="D9871" />

  <folder

    Name="OldProjects"

    DateDeleted="2024-06-14T08:10:00.000Z"

    TotalSize="2048000"

    OriginalFolderId="3200"

    DeletePath="/Finance/OldProjects"

    DeletedById="12"

    DeletedByName="jsmith"

    RecycledItemStatusId="0"

    RecycledItemStatus="In User Recycle Bin"

    Handler="F4312" />

</response>

Response Attribute Reference

Attribute Description
Name Original name of the deleted document or folder.
DateDeleted UTC date and time the item was deleted, in ISO 8601 format (yyyy-MM-ddTHH:mm:ss.fffZ).
TotalSize Total size of the item in bytes (rounded to nearest integer). For folders this includes all content.
OriginalFolderId Internal ID of the folder the item was deleted from.
DeletePath Full infoRouter path the item occupied before it was deleted.
DeletedById Internal user ID of the user who deleted the item.
DeletedByName Username of the user who deleted the item.
RecycledItemStatusId Integer status code: 0 = In User Recycle Bin, 1 = In System Recycle Bin.
RecycledItemStatus Localized string label for the status.
Handler Item handler used to reference this item in PurgeRecycleBinItem and RestoreRecycleBinItem. Format: D{id} for documents, F{id} for folders (e.g. D9871, F4312).

Empty Recycle Bin Response

When the bin is empty, the response contains no child elements:


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

Error Response


<response success="false" error="[901] Session expired or Invalid ticket." />


Required Permissions

Any authenticated user can retrieve their own Recycle Bin contents. The API always returns items belonging to the user identified by the authentication ticket -“ it cannot be used to query another user’s Recycle Bin.


Example

GET Request


GET /srv.asmx/GetRecycleBinContent

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

HTTP/1.1

POST Request


POST /srv.asmx/GetRecycleBinContent HTTP/1.1

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



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

SOAP Request


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

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

  <soap:Body>

    <tns:GetRecycleBinContent>

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

    </tns:GetRecycleBinContent>

  </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.
Insufficient rights. Anonymous users cannot perform this action. The ticket resolved to an anonymous (unauthenticated) user.
SystemError:... An unexpected server-side error occurred.