Bookmarks
Query, insert, update and delete the available bookmarks in Box.
テーブル固有の情報
Select
WHERE 句で条件を指定せずにブックマークを検索すると、デフォルトでルートフォルダから最大5レベルのブックマークのみが返されます。接続文字列でデフォルトの深度値を変更できます。e.g. DirectoryRetrievalDepth=10
SELECT * FROM Bookmarks
Id を指定して、ブックマークを取得します。
Select * FROM Bookmarks WHERE Id='8397822180'
エンタープライズ内のすべてのブックマークを検索するには、SearhTerms カラムを付けてブックマークテーブルをクエリします。
SELECT * FROM Bookmarks WHERE SearchTerms LIKE '%CData%' AND OwnerUserIds='311997108,1'
特定のフォルダ内のすべてのブックマークを検索するには、ParentId カラムを付けてブックマークテーブルをクエリします。
SELECT * FROM Bookmarks WHERE ParentId=62297447480
Insert
ブックマークを挿入するには、少なくともURL とParentId カラムを指定する必要があります。
INSERT INTO Bookmarks(Url,Name,Description,ParentId) VALUES('https://www.cdata.com/','CData','Visit CData!',0)
Update
ReadOnly=False のカラムが更新可能です。
UPDATE Bookmarks SET Name='CData Updated Bookmark', ParentId=62297447480 WHERE Id=8397822180
Delete
ブックマークは、Id を指定してDELETE ステートメントを発行することで削除できます。このブックマークはTrashedItems に移動されます。
DELETE FROM Bookmarks WHERE Id=8397822180
Columns
Name | Type | ReadOnly | Description |
Id [KEY] | String | True |
The Id of the bookmark. |
Url | String | False |
The URL of the bookmark. |
Name | String | False |
The name of the bookmark. |
Description | String | False |
The description of the bookmark. |
ParentId | String | False |
The Id of the folder that contains the bookmark. |
CreatedAt | Datetime | True |
The date the content of the bookmark was created at. |
CreatedById | String | True |
The Id of the user that created the bookmark. |
CreatedByName | String | True |
The Name of the user that created the bookmark. |
CreatedByLogin | String | True |
The Login of the user that created the bookmark. |
ModifiedAt | Datetime | True |
The date the content of the bookmark was modified at. |
ModifiedById | String | True |
The Id of the user that last modified the bookmark. |
ModifiedByName | String | True |
The Name of the user that last modified the bookmark. |
ModifiedByLogin | String | True |
The Login of the user that last modified the bookmark. |
OwnedById | String | True |
The Id of the user that owns the bookmark. |
OwnedByName | String | True |
The Name of the user that owns the bookmark. |
OwnedByLogin | String | True |
The Login of the user that owns the bookmark. |
Etag | String | True |
The Etag of the bookmark |
SequenceId | String | True |
The sequence Id of the bookmark. |
SharedLink | String | True |
The shared url of the bookmark. |
ItemStatus | String | True |
The status of the bookmark. |
Path | String | True |
The full path of the bookmark. |
Pseudo-Columns
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
Name | Type | Description |
SearchTerms | String |
Query to search the bookmarks database. |
Scope | String |
The scope of the search. 使用できる値は次のとおりです。user_content, enterprise_content |
OwnerUserIDs | String |
The Ids of the owners to limit the search to, separated by a comma. |
AncestorFolderIDs | String |
The Ids of the folders to limit the search to, separated by a comma. |
AsUserId | String |
The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |