SharedItems
Query the available shared items in Box.
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 | References | Description |
| Name | String | The name of the shared item. | |
| ItemId [KEY] | String | The Id of the shared item. | |
| ItemType | String | The item type that the shared item points to. | |
| CreatedAt | String | The date the shared item was created at. | |
| Description | String | The description of the of the shared item. | |
| ModifiedAt | String | The date the shared item was modified at. | |
| OwnedById | String |
Users.Id | The id of owner of the shared item. |
| OwnedByName | String | The name of owner of the shared item. | |
| OwnedByLogin | String | The login of owner of the shared item. | |
| ParentId | String | The id of the parent of the shared item. | |
| ParentName | String | The Name of the parent of the shared item. | |
| Access | String | The availability of the shared item. | |
| DownloadCount | Integer | The number of times the item was downloaded | |
| DownloadUrl | String | The url to download the item from. | |
| IsPasswordEnabled | String | If you need to specify a password to download the file or not. | |
| CanDownload | Boolean | If the item is available to download or not. | |
| CanPreview | Boolean | If the item is available to preview or not. | |
| PreviewCount | Integer | The number of times the item was previewed. | |
| Url | String | The preview url of the item. | |
| Size | Long | The size of the item. | |
| AsUserId | String | The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |
Pseudocolumns
Pseudocolumn fields are used in the WHERE clause of SELECT statements and offer more granular control over the data returned from the data source.
| Name | Type | Description | |
| SharedLink | String | The shared link to query. | |
| SharedLinkPassword | String | The password of shared link. |