SharedItems
Retrieves items that have been shared, including their shared links and associated access permissions.
Table Specific Information
Shared Items are Files that are open to public viewing by using a URL. These files can also be password protected. Anyone who has access to this URL and password can read/write to the file.
Select
To select from the Shared Items view, specify the SharedLink column that points to the item.
SELECT * FROM SharedItems WHERE SharedLink = 'https://app.box.co/s/abcdef123456';
If the SharedItem has a password, specify the password as well.
SELECT * FROM SharedItems WHERE SharedLink = 'www.url.com' AND SharedLinkPassword = 'password';
If you're authenticated as an administrator with user impersonation permissions, you can query shared items from multiple user accounts. For example:
SELECT * FROM SharedItems WHERE AsUserId IN (SELECT Id FROM Users);
Note: User impersonation has the following limitations:
- The authenticated user cannot be impersonated unless that user is a service account.
- If the authenticated user is a standard user account, they can only query shared items associated with their account.
- Shared items shared with multiple users are only returned for one of the users.
Columns
| Name | Type | Description |
| Name | String | The name of the shared item. |
| ItemId [KEY] | String | The unique identifier of the shared item. |
| ItemType | String | The type of shared item, such as file, folder, or web link. |
| CreatedAt | String | The date and time when the shared item was created. |
| Description | String | The description of the shared item. |
| ModifiedAt | String | The date and time when the shared item was last modified. |
| OwnedById | String | The Id of the user who owns the shared item. |
| OwnedByName | String | The name of the user who owns the shared item. |
| OwnedByLogin | String | The login (email) of the user who owns the shared item. |
| ParentId | String | The Id of the parent folder or container of the shared item. |
| ParentName | String | The name of the parent folder or container of the shared item. |
| Access | String | Indicates the level of availability for the shared item, such as open or restricted. |
| DownloadCount | Integer | The number of times the shared item has been downloaded. |
| DownloadUrl | String | The direct URL to download the shared item. |
| IsPasswordEnabled | String | Indicates whether a password is required to access the shared item. |
| CanDownload | Boolean | Specifies whether the shared item can be downloaded. |
| CanPreview | Boolean | Specifies whether the shared item can be previewed. |
| PreviewCount | Integer | The number of times the shared item has been previewed. |
| Url | String | The preview URL for the shared item. |
| Size | Long | The size of the shared item in bytes. |
| AsUserId | String | The Id of the user you want to impersonate. Only works with Admin, Co-Admin, and Service Accounts. |
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 |
| SharedLink | String | The shared link used to access the item. |
| SharedLinkPassword | String | The password for the shared link, if required. |