TrashedItems
Delete and query the available TrashedItems in Box.
Table Specific Information
TrashedItems are Files and Folders that have been deleted. This table supports only two operations: Select and Delete. Deleting from this table permanently deletes the File and is not recoverable.
Select
To search in the TrashedItems table for a specific item, specify the type of the item (File,Folder or WEB_LINK).
SELECT * FROM TrashedItems WHERE SearchTerms LIKE '%Untitled%' AND Type = 'file'
Or, if you want to query a single deleted Folder you could execute a query like the following:
SELECT * FROM TrashedItems WHERE Id = '123' AND Type = 'folder'
Or, if you want to query a single deleted Bookmark you could execute a query like the following:
SELECT * FROM TrashedItems WHERE Id = '123' AND Type = 'web_link'
Delete
TrashedItems can be deleted by specifying the Id and the Type of the item and issuing a DELETE statement.
DELETE FROM TrashedItems WHERE Id = 'abc123' AND Type = 'file'
Columns
Name | Type | ReadOnly | Description |
SearchTerms | String | False |
Query to search the trashed items database. |
Id [KEY] | String | False |
The Id of the trashed item. |
Name | String | False |
The name of the trashed item. |
Type | String | False |
The type of the item can be trashed item,folder or web_link. |
Sha1 | String | False |
The SHA-1 encryption of the trashed item. |
Etag | String | False |
The Etag of the trashed item. |
SequenceId | String | False |
The sequence Id of the trashed item. |
Description | String | False |
The description of the trashed item. |
Size | Integer | False |
The size of the trashed item. |
CreatedAt | Datetime | False |
The date the trashed item was created at. |
ModifiedAt | Datetime | False |
The date the trashed item was modified at. |
TrashedAt | Datetime | False |
The date the trashed item was trashed at. |
PurgedAt | Datetime | False |
The date the trashed item was purged at. |
ContentCreatedAt | Datetime | False |
The date the content of the trashed item was created at. |
ContentModifiedAt | Datetime | False |
The date the content of the trashed item was modified at. |
CreatedById | String | False |
The Id of the user that created the trashed item. |
CreatedByName | String | False |
The Name of the user that created the trashed item.. |
CreatedByLogin | String | False |
The Login of the user that created the trashed item.. |
SharedLink | String | False |
The shared link of the user that created the trashed item. |
ModifiedBy | String | False |
The Id of the user that last modified the trashed item. |
ModifiedByName | String | False |
The Name of the user that last modified the trashed item.. |
ModifiedByLogin | String | False |
The Login of the user that last modified the trashed item.. |
OwnedById | String | False |
The Id of the user that owns the trashed item. |
OwnedByName | String | False |
The Name of the user that owns the trashed item.. |
OwnedByLogin | String | False |
The Login of the user that owns the trashed item.. |
ParentId | String | False |
The Id of the folder that contains the trashed item. |
ItemStatus | String | False |
The status of the trashed item. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
Scope | String |
The scope of the search. |
FileExtension | String |
The extension of the trashed item. |
SearchContent | String |
The content to search the query at, separated by commas. |
AsUserId | String |
The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |