Bookmarks
Stores and manages bookmarks that reference web links saved within Box, allowing users to create, update, delete, and retrieve them.
Table Specific Information
Select
If you query Bookmarks without specifying any condition in the WHERE Clause, only bookmarks up to 5 levels deep from the root folder are returned by default. You can change the default depth value in the connection string (for example, DirectoryRetrievalDepth=10).
SELECT * FROM Bookmarks;
By default, the search starts from the root directory, identified as directory '0'. To customize the starting directory for your search, specify its Id using the SearchRootId column.
SELECT * FROM Bookmarks WHERE SearchRootId = '293533136411';
Retrieve a bookmark by specifying the Id:
SELECT * FROM Bookmarks WHERE Id = '8397822180';
To search all the bookmarks in your enterprise, query the Bookmarks table with the Search Terms column.
SELECT * FROM Bookmarks WHERE SearchTerms LIKE '%CData%' AND OwnerUserIds = '311997108,1';
To search all the bookmarks within a specific folder, query the Bookmarks table with the ParentId column.
SELECT * FROM Bookmarks WHERE ParentId = 62297447480;
Note: When using a ParentId filter, avoid specifying a SearchRootId simultaneously. If both are used, the search will recursively start from the specified SearchRootId instead of the ParentId, which may result in slower performance.
If you're authenticated as an administrator with user impersonation permissions, you can query bookmarks from multiple user accounts:
SELECT * FROM Bookmarks 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 bookmarks associated with their account.
- Bookmarks shared with multiple users are only returned for one of the users.
Insert
To insert a bookmark you must specify at least the URL and ParentId column.
INSERT INTO Bookmarks (Url, Name, Description, ParentId) VALUES ('https://www.cdata.com/', 'CData', 'Visit CData!', 0);
Update
Any column where ReadOnly=False can be updated.
UPDATE Bookmarks SET Name = 'CData Updated Bookmark', ParentId = 62297447480 WHERE Id = 8397822180;
Delete
Delete a bookmark by specifying its Id. This bookmark is then moved to TrashedItems.
DELETE FROM Bookmarks WHERE Id = 8397822180;
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | String | True |
Unique identifier assigned to the bookmark within Box. |
| Url | String | False |
The web address the bookmark points to, used to link to external resources. |
| Name | String | False |
The display name given to the bookmark. |
| Description | String | False |
A user-provided description of the bookmark's purpose or content. |
| ParentId | String | False |
Identifier of the folder that contains the bookmark, defining its location in Box. |
| CreatedAt | Datetime | True |
The date and time when the bookmark was originally created in Box. |
| CreatedById | String | True |
Identifier of the user who created the bookmark. |
| CreatedByName | String | True |
The full name of the user who created the bookmark. |
| CreatedByLogin | String | True |
The login email of the user who created the bookmark. |
| ModifiedAt | Datetime | True |
The date and time when the bookmark was last updated. |
| ModifiedById | String | True |
Identifier of the user who last modified the bookmark. |
| ModifiedByName | String | True |
The full name of the user who last modified the bookmark. |
| ModifiedByLogin | String | True |
The login email of the user who last modified the bookmark. |
| OwnedById | String | True |
Identifier of the user who owns the bookmark. |
| OwnedByName | String | True |
The full name of the user who owns the bookmark. |
| OwnedByLogin | String | True |
The login email of the user who owns the bookmark. |
| Etag | String | True |
Version identifier for the bookmark used to detect changes and manage concurrency. |
| SequenceId | String | True |
An incremental identifier representing the version sequence of the bookmark. |
| SharedLink | String | True |
A shareable URL generated to provide access to the bookmark. |
| ItemStatus | String | True |
The current state of the bookmark, such as active or trashed. |
| Path | String | True |
The full folder path leading to the bookmark within the Box hierarchy. |
| AsUserId | String | False |
Identifier of the user to impersonate when making API calls, available only for Admin, Co-Admin, and Service Accounts. |
| SearchRootId | String | True |
The folder identifier that defines the starting point for recursive searches, with '0' indicating the root folder. |
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 |
| SearchTerms | String |
Keywords used to search bookmarks stored in Box. |
| Scope | String |
The scope of the search, such as limiting results to a user or enterprise. The allowed values are user_content, enterprise_content. |
| OwnerUserIDs | String |
A list of user identifiers separated by a comma, used to restrict searches to bookmarks owned by specific users. |
| AncestorFolderIDs | String |
A list of folder identifiers separated by a comma, used to restrict searches to bookmarks contained within specific folders. |