CData Sync App は、Box データをデータベース、データレイク、またはデータウェアハウスに継続的にパイプライン化する簡単な方法を提供し、分析、レポート、AI、および機械学習で簡単に利用できるようにします。
Box コネクタはCData Sync アプリケーションから使用可能で、Box からデータを取得して、サポートされている任意の同期先に移動できます。
Sync App アプリケーションの接続 ページに移動し、接続の追加 パネルで対応するアイコンを選択して、Box への接続を作成します。Box アイコンが利用できない場合は、Add More アイコンをクリックしてCData サイトからBox コネクタをダウンロードおよびインストールします。
必須プロパティは[設定]タブにリストされています。[Advanced]タブには、通常は必要ない接続プロパティが表示されます。
Sync App は、Box テーブルおよびフォルダへのアクセスを実現します。なお、Sync App はBox に格納されているファイルの内容を更新したり、ファイルの内容をテーブルやカラムとしてモデル化したりはできません。
Sync App は、Box への接続にOAuth 認証標準を使います。 ユーザーアカウントまたはサービスアカウントで認証できます。下記で説明するとおり、Sync App はこれらの認証フローをサポートします。
AuthScheme は、すべてのユーザーアカウントフローでOAuth に設定する必要があります。
Web アプリケーション経由で接続する場合は、Box にカスタムOAuth アプリを登録する必要があります。それからSync App を使用してOAuth トークンの値を取得および管理します。詳しくは、カスタムOAuth アプリの作成 を参照してください。
OAuth アクセストークンの取得
次の接続プロパティを設定し、OAuthAccessToken を取得します。
続いてストアドプロシージャを呼び出し、OAuth 交換を完了します。
アクセストークンとリフレッシュトークンを取得した後、データに接続し、OAuth アクセストークンを自動または手動でリフレッシュすることが可能です。
OAuth アクセストークンの自動リフレッシュ
Sync App がOAuth アクセストークンを自動的にリフレッシュするようにするには、最初のデータ接続で次のように設定します。
OAuth アクセストークンの手動リフレッシュ
データ接続時に手動でOAuth アクセストークンをリフレッシュするために必要な値は、OAuth リフレッシュトークンのみです。 RefreshOAuthAccessToken ストアドプロシージャを使用して、GetOAuthAccessToken によって返されたExpiresIn パラメータ値が経過した後に手動でOAuthAccessToken をリフレッシュし、次の接続プロパティを設定します。
次に、RefreshOAuthAccessToken を呼び出し、OAuthRefreshToken にGetOAuthAccessToken によって返されたOAuth リフレッシュトークンを指定します。新しいトークンが取得できたら、OAuthAccessToken プロパティにRefreshOAuthAccessToken によって返された値を設定し、新しい接続をオープンします。
最後に、OAuth リフレッシュトークンを保存し、OAuth アクセストークンの有効期限が切れた後に手動でリフレッシュできるようにします。
サービスアカウントを使用するには、OAuth アプリケーションの作成が必要です。アプリの作成および認可については、カスタムOAuth アプリの作成 を参照してください。これでサービスアカウントにアクセス権があるBox データに接続できます。
次の接続プロパティを設定して、接続してください。
このセクションでは、Box Sync App の高度な機能を厳選して説明します。
Sync App を使用すると、事前設定されたクエリによって内容が決定されるユーザー定義ビューと呼ばれる仮想テーブルを定義できます。 このビューは、ドライバーに発行されるクエリを直接制御できない場合に有効です。 カスタムビューの作成と設定の概要については、ユーザー定義ビュー を参照してください。
SSL の設定 を使用して、Sync App が証明書のネゴシエーションをどのように扱うかを調整します。さまざまな証明書形式を選択できます。 詳しくは、接続文字列オプションにあるSSLServerCert プロパティを参照してください。
Windows プロキシとHTTP プロキシを含むファイアウォールとプロキシ に合致するようSync App を設定します。トンネル接続を設定することもできます。
Sync App は、Box にできるだけ多くのSELECT ステートメント処理をオフロードし、残りのクエリをクライアント側のインメモリで処理します。
詳しくはクエリ処理 を参照してください。
CData ログを調整するために使用可能な設定の概要については、ログ を参照してください。基本的なロギングでは、 次の2つの接続プロパティを設定するだけです。LogModules 接続プロパティを使用してログに記録する情報のサブセットを選択できる、 より洗練されたロギングをサポートする多数の機能があります。
デフォルトでは、Sync App はサーバーの証明書をシステムの信頼できる証明書ストアと照合してSSL / TLS のネゴシエーションを試みます。
別の証明書を指定するには、利用可能なフォーマットについてSSLServerCert プロパティを参照してください。
Windows のシステムプロキシ経由の接続では、接続プロパティを追加で設定する必要はありません。他のプロキシに接続するには、ProxyAutoDetect をfalse に設定します。
さらにHTTP プロキシへの認証には、ProxyServer とProxyPort に加えてProxyAuthScheme、ProxyUser、およびProxyPassword を設定します。
次のプロパティを設定します。
Sync App は、Box テーブルやフォルダ、およびUsers、Tasks、Groups などの関連エンティティのメタデータへのアクセスを実現します。
テーブル は、FileVersions やUserEvents などのBox エンティティをモデル化する読み取り専用のテーブルです。
ストアドプロシージャ は、Box のファンクションライクなインターフェースです。ファイルのダウンロード、アップロード、コピーなどのタスクを実行するために使用できます。
Sync App はBox のデータを、標準のSQL ステートメントを使用してクエリできるテーブルのリストにモデル化します。
一般的には、Box テーブルのクエリは、リレーショナルデータベースのテーブルのクエリと同じです。時には特別なケースもあります。例えば、テーブルの特定のカラムデータを取得するために特定のカラムをWHERE 句に含める必要がある場合などです。これは通常、特定のカラムを取得するために行ごとに個別のリクエストを行う必要がある場合に必要です。これらの特別な状況は、以下にリンクされているテーブルページの上部に明確に文書化されています。
Name | Description |
Bookmarks | Query, insert, update and delete the available bookmarks in Box. |
Collaborations | Create, update, delete, and query the available Collaborations in Box. |
Comments | Create, update, delete, and query the available Comments in Box. |
Folders | Create, update, delete, and query the available Folders in Box. |
Groups | Create, update, delete, and query the available Groups in Box. |
Memberships | Create, update, delete, and query the available Memberships in Box. |
MetadataTemplates | Create, update, delete and query the Metadata Templates in Box |
TaskAssignments | Create, update, delete, and query the available Task Assignments in Box. |
Tasks | Create, update, delete, and query the available Tasks in Box. |
TrashedItems | Delete and query the available TrashedItems in Box. |
Users | Create, update, delete, and query the available Users in Box. |
Query, insert, update and delete the available bookmarks in Box.
If you search for bookmarks without specifying any condition in the WHERE Clause, by default only the bookmarks that are at most 5 levels deep from the root folder will be returned. You can change the default depth value in the connection string; e.g. DirectoryRetrievalDepth=10.
SELECT * FROM Bookmarks
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 column SearchTerms.
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
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)
Any column where ReadOnly=False can be updated.
UPDATE Bookmarks SET Name = 'CData Updated Bookmark', ParentId = 62297447480 WHERE Id = 8397822180
Bookmarks can be deleted by providing an Id and issuing a DELETE statement. This bookmark is then moved to TrashedItems.
DELETE FROM Bookmarks WHERE Id = 8397822180
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. |
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. |
Create, update, delete, and query the available Collaborations in Box.
Collaborations はFolders およびGroups の間のコネクションであり、一つのGroup は特定のCollaboration とコラボレートできます。
Collaborations テーブルをクエリするには、Id、FolderId、もしくはGroupId を指定します。
SELECT * FROM Collaborations WHERE Id = '123'
Collaborations に挿入するには、Folder にGroup もしくはUser を紐付けてRole を割り当てます。
INSERT INTO Collaborations(Role, ItemId, ItemType, AccessibleById, AccessibleByType) VALUES('admin', '1', 'folder', '2', 'user')
Collaboration では、Role およびStatus だけが更新可能です。
UPDATE Collaborations SET Role = 'viewer', Status = 'accepted' WHERE Id = '100'
Collaborations は、Id を指定してDELETE ステートメントを発行することで削除できます。
DELETE FROM Collaborations WHERE Id = '100'
Name | Type | ReadOnly | Description |
Id [KEY] | String | True |
The Id of the collaboration. |
CreatedAt | Datetime | True |
The date the collaboration was created at. |
ModifiedAt | Datetime | True |
The date the collaboration was modified at. |
AcknowledgedAt | Datetime | True |
The date the collaboration was acknowledged. |
CreatedById | String | True |
The Id of the user that created the collaboration. |
Status | String | False |
The status of the collaboration. |
Role | String | False |
The role of the user or group of the collaborator. Allowed values are editor, viewer, previewer, uploader, previewer uploader, viewer uploader, co-owner, or owner |
ItemId | String | False |
The Id of the item the collaboration is related to. |
ItemType | String | False |
The type of the item the collaboration is related to. |
AccessibleById | String | False |
The Id of the group/user that can access this collaboration. |
AccessibleByType | String | False |
The type of the entity of Accessible_By_Id. 使用できる値は次のとおりです。group, user |
AccessibleByLogin | String | False |
The login of the the Accessible_By_Id. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
Name | Type | Description |
FolderId | String |
The Id of the folder the collaboration is related to. |
GroupId | String |
The Id of the group the collaboration is related to. |
AsUserId | String |
The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |
Create, update, delete, and query the available Comments in Box.
Comments はFile に付けられた追加情報です。これらのComments は子Comments を持つことができます。
Comments テーブルをクエリするには、Id、もしくはFileId を指定します。
SELECT * FROM Comments WHERE Id = '123'
Comments への挿入には、Comments を挿入するアイテム、およびMessage を指定する必要があります。Message、もしくはTaggedMessage のどちらか片方を指定します。
INSERT INTO Comments(ItemId, ItemType, Message) VALUES('1', 'file', 'example comment')
Comment のメッセージだけが更新できます。
UPDATE Comments SET Message = 'editor' WHERE Id = '100'
Comments は、Id を指定してDELETE ステートメントを発行することで削除できます。
DELETE FROM Comments WHERE Id = '100'
Name | Type | ReadOnly | Description |
Id [KEY] | String | True |
The Id of the comment. |
Message | String | False |
The plain message of the comment. Use only this or tagged_message not both. |
TaggedMessage | String | False |
The tagged message of the comment. Setting this as @[USER_ID:USERNAME] tags the user and notifies him. A tagged message that does not contain a proper tag will give an error. |
ItemId | String | False |
The Id of the item the comment is targeted to. |
ItemType | String | False |
The type of the item the comment is targeted to. This can be a file or another comment. 使用できる値は次のとおりです。file, comment |
CreatedById | String | True |
The id of the user that created the item. |
CreatedByName | String | True |
The name of the user that created the item. |
CreatedByLogin | String | True |
The login user that created the item. |
CreatedAt | Datetime | True |
The date the item was created. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
Name | Type | Description |
FileID | String |
The File ID the comment is connected to, is not used to insert to this table. |
AsUserId | String |
The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |
Update, delete, and query the available Files in Box.
WHERE 句で条件を指定せずにファイルを検索すると、デフォルトでルートフォルダから最大5レベルのファイルのみが返されます。接続文字列でデフォルトの深度値を変更できます。e.g. DirectoryRetrievalDepth=10
SELECT * FROM Files
エンタープライズ内のすべてのFiles を検索するには、SearhTerms カラムでFiles テーブルをクエリします。
SELECT * FROM Files WHERE SearchTerms LIKE '%untitled%'
特定のフォルダ内のすべてのFiles を検索するには、ParentId カラムの関連するフォルダのId でフィルタリングしてFiles テーブルをクエリします。
SELECT * FROM Files WHERE ParentId = '12'
少なくともPath の値を指定する必要があります。これはローカルファイルパスを表します。
INSERT INTO Files (Path) VALUES ("c:/file.txt")
ReadOnly=False のカラムが更新可能です。
UPDATE Files SET Description = 'example description', Sharedlink='http://sharedlink.com', OwnedbyId='321', ParentId='12', Name = 'updated file name' WHERE Id = '123'
Files は、Id を指定してDELETE ステートメントを発行することで削除できます。このファイルはTrashedItems に移動されます。
DELETE FROM Files WHERE Id = '100'
Name | Type | ReadOnly | Description |
SearchTerms | String | True |
Query to search the files database. |
Id [KEY] | String | True |
The Id of the file. |
Name | String | False |
The name of the file. |
Sha1 | String | False |
The SHA-1 encryption of the file. |
Etag | String | False |
The Etag of the file |
SequenceId | String | False |
The sequence Id of the file. |
Description | String | False |
The description of the file. |
Size | Integer | True |
The size of the file. |
CreatedAt | Datetime | True |
The date the file was created at. |
ModifiedAt | Datetime | True |
The date the file was modified at. |
TrashedAt | Datetime | True |
The date the file was trashed at. |
PurgedAt | Datetime | True |
The date the file was purged at. |
ContentCreatedAt | Datetime | True |
The date the content of the file was created at. |
ContentModifiedAt | Datetime | True |
The date the content of the file was modified at. |
CreatedById | String | True |
The Id of the user that created the file. |
CreatedByName | String | True |
The Name of the user that created the file. |
CreatedByLogin | String | True |
The Login of the user that created the file. |
SharedLink | String | False |
The shared url of the file. |
ModifiedById | String | True |
The Id of the user that last modified the file. |
ModifiedByName | String | True |
The Name of the user that last modified the file. |
ModifiedByLogin | String | True |
The Login of the user that last modified the file. |
OwnedById | String | False |
The Id of the user that owns the file. |
OwnedByName | String | False |
The Name of the user that owns the file. |
OwnedByLogin | String | False |
The Login of the user that owns the file. |
ParentId | String | False |
The Id of the folder that contains the file. |
ItemStatus | String | False |
The status of the file. |
Path | String | True |
The full path of the file. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
Name | Type | Description |
Scope | String |
The scope of the search. |
FileExtension | String |
The extension of the file. |
ContentTypes | String |
The content to search the query at, separated by commas. This can contain a mixture of the following: name, file_content, description, comments, tags. |
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. |
Create, update, delete, and query the available Folders in Box.
WHERE 句で条件を指定せずにフォルダを検索すると、デフォルトでルートフォルダから最大5レベルのフォルダのみが返されます。接続文字列でデフォルトの深度値を変更できます。e.g. DirectoryRetrievalDepth=10
SELECT * FROM Folders
エンタープライズ内のすべてのFolders を検索するには、SearhTerms カラムを付けてFolders テーブルをクエリします。
SELECT * FROM Folders WHERE SearchTerms LIKE '%untitled%'
特定のフォルダ内のすべてのFolders を検索するには、ParentId カラムを付けてFolders テーブルをクエリします。
SELECT * FROM Folders WHERE ParentId = '12'
Folder のId および親Folder のId を指定する必要があります。ルートFolder のParentId には、0を使います。
INSERT INTO Folders(Name, ParentId, SharedLink, Description, Access, OwnedById) VALUES ('new folder', '0', 'http://sharedlink.com', 'example desc', 'open', '123')
ReadOnly=False のカラムが更新可能です。
UPDATE Folders SET Description = 'example description', Access = 'open', SharedLink='http://sharedlink.com', OwnedById='321', ParentId='12', Name = 'no longer new folder' WHERE Id = '123'
Folders は、Id を指定してDELETE ステートメントを発行することで削除できます。
DELETE FROM Folders WHERE Id = '123'
Name | Type | ReadOnly | Description |
SearchTerms | String | True |
Query to search the folders database. |
Id [KEY] | String | True |
The Id of the folder. |
Name | String | False |
The name of the folder. |
Etag | String | True |
The Etag of the folder |
SequenceId | String | False |
The sequence Id of the folder. |
Description | String | False |
The description of the folder. |
Access | String | False |
The email access of this folder to. 使用できる値は次のとおりです。open, collaborators, null |
Size | Integer | True |
The size of the file. |
CreatedAt | Datetime | True |
The date the file was created at. |
ModifiedAt | Datetime | True |
The date the file was modified at. |
TrashedAt | Datetime | True |
The date the folder was trashed at. |
PurgedAt | Datetime | True |
The date the folder was purged at. |
ContentCreatedAt | Datetime | True |
The date the content of the folder was created at. |
ContentModifiedAt | Datetime | True |
The date the content of the folder was modified at. |
CreatedBy | String | True |
The Id of the user that created the folder. |
CreatedByName | String | True |
The Name of the user that created the folder. |
CreatedByLogin | String | True |
The Login of the user that created the folder. |
SharedLink | String | False |
The Id of the user that created the folder. |
ModifiedBy | String | True |
The Id of the user that last modified the folder. |
ModifiedByName | String | True |
The Name of the user that last modified the folder. |
ModifiedByLogin | String | True |
The Login of the user that last modified the folder. |
OwnedById | String | False |
The Id user that owns the folder. |
OwnedByName | String | True |
The Name of the user that owns the folder. |
OwnedByLogin | String | True |
The Login of the user that owns the folder. |
ParentId | String | False |
The Id of the folder that contains the folder. |
ItemStatus | String | True |
The status of the folder. |
Path | String | True |
The full path of the folder. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
Name | Type | Description |
Scope | String |
The scope of the search. |
ContentTypes | String |
The content to search the query at, separated by commas. This can contain a mixture of the following: name, file_content, description, comments, tags. |
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. |
Create, update, delete, and query the available Groups in Box.
すべてのGroup の取得、またはId でのフィルタが可能です。
SELECT * FROM Groups
Group の作成は、Name カラムだけで可能です。
INSERT INTO Groups(Name, Provenance, MemberViewabilityLevel) VALUES('new group', 'google', 'admins_only')
ReadOnly=False のカラムが更新可能です。
UPDATE Groups SET InvitabilityLevel='admins_and_members' WHERE Id = '111'
Groups は、Id を指定してDELETE ステートメントを発行することで削除できます。
DELETE FROM Groups WHERE Id = '111'
Name | Type | ReadOnly | Description |
ID [KEY] | String | True |
The Id of the group. |
Name | String | False |
The name of the group. |
Provenance | String | False |
Typically used to track the external source where the group is coming from. |
ExternalSyncIdentifier | String | False |
Typically used as a group identifier for groups coming from an external source. |
Description | String | False |
The description of the group. |
InvitabilityLevel | String | False |
Specifies who can invite this group to folders. |
MemberViewabilityLevel | String | False |
Specifies who can view the members of this group. |
CreatedAt | Datetime | True |
The date the group was created at, you need to specify an Id to recieve this column. |
ModifiedAt | Datetime | True |
The date the group was modified at, you need to specify an Id to recieve this column. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
Name | Type | Description |
AsUserId | String |
The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |
Create, update, delete, and query the available Memberships in Box.
Membership はUser とGroup のリレーションです。
Memberships テーブルからのSelect には、Id、GroupId、またはUserId を指定してください。
SELECT * FROM Memberships WHERE Id = '123'
Memberships に挿入するには、Group(GroupId)とUser(UserId)を紐付けます。
INSERT INTO Memberships(GroupId, UserId) VALUES(1001, 123)
Member のロールだけが更新可能です。デフォルトのロールは'Member' で、'admin' のオプションが可能です。
UPDATE Memberships SET Role = 'admin' WHERE Id = '100'
Memberships は、Id を指定してDELETE ステートメントを発行することで削除できます。
DELETE FROM Memberships WHERE Id = '100'
Name | Type | ReadOnly | Description |
Id [KEY] | String | True |
The Id of the membership. |
Role | String | False |
The role of the user that is in this membership. |
CreatedAt | Datetime | True |
The date the membership was created at, you need to specify an Id to recieve this column. |
ModifiedAt | Datetime | True |
The date the membership was modified at, you need to specify an Id to recieve this column. |
UserName | String | True |
The name of the user of the membership. |
UserLogin | String | True |
The login of the user of the membership. |
UserId | String | False |
The id of the user of the membership. |
GroupName | String | False |
The group name of the membership. |
GroupId | String | False |
The group of the membership. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
Name | Type | Description |
AsUserId | String |
The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |
Create, update, delete and query the Metadata Templates in Box
You can retrieve information about the Metadata Template.
SELECT * FROM MetadataTemplates
You can also retrieve the information of any Template in your enterprise:
SELECT * FROM MetadataTemplates WHERE Id = 'e93746cc-03f6-4dee-ab45-01834989950c'
You can insert Metadata Template for your enterprise.
Insert a single field to the Template.
INSERT INTO MetadataTemplates(DisplayName, Scope, FieldsDisplayName, FieldsType) VALUES ('TestTemplate', 'enterprise', 'TestField', 'String')
Insert multiple fields to the Template.
INSERT INTO MetadataFields#Temp (FieldDisplayName, FieldType, FieldOptions) VALUES ('Industry', 'enum', 'Technology,HealthCare') INSERT INTO MetadataFields#Temp (FieldDisplayName, FieldType) VALUES ('Contact Role', 'string') INSERT INTO MetadataTemplates(DisplayName, Scope, FieldsAggregate) VALUES ('TestTemplate', 'enterprise', 'MetadataFields#Temp')
Add field to the existing Template.
UPDATE MetadataTemplates SET Op='addField', FieldsKey='category', FieldsDisplayName='Category', FieldsisHidden=false, FieldsType='string' WHERE Scope='enterprise' AND TemplateKey='TestTemplate'
Update Fields in the Template.
UPDATE MetadataTemplates SET Op='editField', FieldsKey='Category', FieldsDescription='The Product Category' WHERE Scope='enterprise' AND TemplateKey='TestTemplate'
ReOrder Fields in the Template.
UPDATE MetadataTemplates SET Op='reorderFields', FieldsKey='Category,Industry,Contact' WHERE Scope='enterprise' AND TemplateKey='TestTemplate'
Remove Fields from the Template.
UPDATE MetadataTemplates SET Op='removeField', FieldsKey='Industry' WHERE Scope='enterprise' AND TemplateKey='TestTemplate'
Add Enum Options to the EnumField.
UPDATE MetadataTemplates SET Op='addEnumOption', FieldsKey='Industry', EnumOptionKey='AL' WHERE Scope='enterprise' AND TemplateKey='TestTemplate'
ReOrder Enum Options in the EnumField.
UPDATE MetadataTemplates SET Op='reorderEnumOptions', FieldsKey='industry', EnumOptionKey='AL,AK,AR,N/A' WHERE Scope='enterprise' AND TemplateKey='TestTemplate'
Update Enum Options in the EnumField. Specify Present value, New value in the EnumOption column separated with comma.
UPDATE MetadataTemplates SET Op='editEnumOption', FieldsKey='industry', EnumOptionKey='N/A,Outside USA' WHERE Scope='enterprise' AND TemplateKey='TestTemplate'
Remove Enum Options from the EnumField
UPDATE MetadataTemplates SET Op='removeEnumOption', FieldsKey='industry', EnumOptionKey='Outside USA' WHERE Scope='enterprise' AND TemplateKey='TestTemplate'
MetadataTemplates can be deleted by providing Scope and TemplateKey and issuing a DELETE statement.
DELETE FROM MetadataTemplates WHERE Scope='enterprise' AND TemplateKey='TestTemplate'
Name | Type | ReadOnly | Description |
Id [KEY] | String | True |
The ID of the metadata template. |
TemplateKey | String | False |
A unique identifier for the template. This identifier is unique across the scope of the enterprise to which the metadata template is being applied, yet is not necessarily unique across different enterprises |
CopyInstanceOnItemCopy | Boolean | False |
Whether or not to copy the metadata for a file or folder when an it is copied. |
DisplayName | String | False |
The display name of the template |
FieldsId [KEY] | String | True |
The Unique Id of the Metadata Template field |
FieldsKey | String | False |
A unique identifier for the field. The identifier must be unique within the template to which it belongs. |
FieldsDisplayName | String | False |
The display name of the field as it is shown to the user in the web and mobile apps. |
FieldsType | String | False |
The type of field |
FieldsDescription | String | False |
A description of the field |
FieldsisHidden | Boolean | False |
Whether this field is hidden in the UI for the user and can only be set through the API instead. |
FieldsOptions | String | False |
A list of options for this field. This is used in combination with the enum and multiSelect field types. |
TemplateisHidden | Boolean | False |
Defines if this template is visible in the Box web app UI, or if it is purely intended for usage through the API |
Scope | String | False |
The scope of the metadata template. |
Type | String | True |
Type of the template. Value is always metadata_template |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
Name | Type | Description |
Op | String |
The type of change to perform on the template. Some of these are hazardous as they will change existing templates. 使用できる値は次のとおりです。editTemplate, addField, reorderFields, addEnumOption, reorderEnumOptions, reorderMultiSelectOptions, addMultiSelectOption, editField, removeField, editEnumOption, removeEnumOption, editMultiSelectOption, removeMultiSelectOption |
EnumOptionKey | String |
Update Only: For operations that affect multiple enum options this defines the keys of the options that are affected. |
MultiSelectOptionKey | String |
Update Only: For operations that affect multiple multi select options this defines the keys of the options that are affected. |
FieldsAggregate | String |
To insert more than one fields in the Template. The accepted columns are FieldsDisplayName, FieldsType, FieldsDescription, FieldsKey, FieldsisHidden, FieldsOptions |
Create, update, delete, and query the available Task Assignments in Box.
Task Assignment は特定のユーザーにアサインされたタスクです。
TaskAssignment テーブルのSelect には、Id もしくはTaskId を指定してください。
SELECT * FROM TasksAssignments WHERE Id = '123'
Task Assignment に挿入するには、Task(TaskId)とUser(AssignedToId) を紐付けます。
INSERT INTO TaskAssignments(TaskId, AssignedToId) VALUES(1001, 123)
Task Assignment のメッセージ、もしくはそのResolutionState だけが更新できます。
UPDATE TaskAssignments SET Message = 'x', ResolutionState='completed' WHERE Id = '111'
Task Assignments は、Id を指定してDELETE ステートメントを発行することで削除できます。
DELETE FROM TaskAssignments WHERE Id = '111'
Name | Type | ReadOnly | Description |
Id [KEY] | String | True |
The Id of the task assignment. |
TaskId | String | False |
The Id of the task to assign. |
AssignedToId | String | False |
The Id of the user to assign the task to. |
AssignedToName | String | False |
The Name of the user the task is assigned to. |
AssignedToLogin | String | False |
The Login of the user the task is assigned to. |
ItemType | String | False |
The the type of the item the task assignment is connected to. |
ItemId | String | False |
The the id of the item the task assignment is connected to. |
ItemName | String | False |
The the name of the item the task assignment is connected to. |
Message | String | False |
The message attached to the task assignment. |
AssignedById | String | False |
The Id of the user that assigned the task. |
AssignedByName | String | False |
The Name of the user that assigned the task. |
AssignedByLogin | String | False |
The Login of the user that assigned the task. |
AssignedAt | Datetime | True |
The date the task was assigned at. |
RemindedAt | Datetime | True |
The date of the task reminder. |
CompletedAt | Datetime | True |
The date the task was completed at. |
ResolutionState | String | False |
Determines if the task has been attended to or not. 使用できる値は次のとおりです。completed, incomplete, approved, rejected |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
Name | Type | Description |
AsUserId | String |
The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |
Create, update, delete, and query the available Tasks in Box.
Task は誰かにアサインされることを待っているジョブです。これらのタスクは、一般的にはFile であるアイテムにリレーションがあります。
Task テーブルのSelect には、Id もしくはItemId を指定してください。
SELECT * FROM Tasks WHERE Id = '123'
Task テーブルへの挿入にはItemId が必要です。現時点ではBox API でタスク管理できるタイプはFile だけです。
INSERT INTO Tasks(ItemId, ItemType, Action, Message) VALUES (1001, 'file', 'review', 'message')
特定のTask を更新するには、Message が必要です。また、Action およびDueAt カラムも更新可能です。Action カラムは'review' の値しか取れません。
UPDATE Tasks SET Message='updated message', Action = 'review', DueAt='2016-05-14' WHERE ID = '100'
Id を指定して、Task を削除することができます。
DELETE FROM Tasks WHERE Id = '100'
Name | Type | ReadOnly | Description |
Id [KEY] | String | True |
The Id of the task. |
DueAt | Datetime | False |
The date due of this task. |
ItemId | String | False |
The Id of the item the task is targeted to. |
ItemType | String | False |
The type of the item the task is targeted to. |
Action | String | False |
The action the task assignee will be prompted to do. |
Message | String | False |
An optional message to include with the task. |
CreatedAt | Datetime | True |
The date that the task was created at. |
CreatedById | String | True |
The id of user that created the task. |
CreatedByName | String | True |
The name of the user that created the task. |
CreatedByLogin | String | True |
The login of the user that created the task. |
IsCompleted | Boolean | False |
If the task has been completed or not. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
Name | Type | Description |
AsUserId | String |
The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |
Delete and query the available TrashedItems in Box.
TrashedItems はすでに削除されたFiles およびFolders です。このテーブルは2つの処理のみが可能です:Update およびDelete。このテーブルから削除するとFile は永久に削除され、戻すことができません。
TrashedItems テーブルの特定のアイテムを検索するには、アイテムのタイプ(File、Folder、またはWEB_LINK)を指定します。
SELECT * FROM TrashedItems WHERE SearchTerms LIKE '%Untitled%' AND Type = 'file'
もしくは、1つの削除済みFolder をクエリしたい場合には、次のようなクエリを実行します:
SELECT * FROM TrashedItems WHERE Id = '123' AND Type = 'folder'
もしくは、1つの削除済みBookmark をクエリしたい場合には、次のようなクエリを実行します:
SELECT * FROM TrashedItems WHERE Id = '123' AND Type = 'web_link'
TrashedItems を削除するには、アイテムのId およびType を指定してDELETE ステートメントを発行します。
DELETE FROM TrashedItems WHERE Id = 'abc123' AND Type = 'file'
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. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
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. |
Create, update, delete, and query the available Users in Box.
カレントユーザー、Id で指定されたエンタープライズ内の一人のユーザー、もしくはエンタープライズ内のすべてのユーザーを取得することができます。
SELECT * FROM Users
エンタープライズ内のユーザーの情報を取得することもできます。
SELECT * FROM Users WHERE Id = '1'
エンタープライズにユーザーを招待することができます。次のクエリは、エンタープライズへの参加の招待メールを送信します。
INSERT INTO Users(Login, Name, Role) VALUES('[email protected]', 'Username', 'coadmin')
ReadOnly=False のカラムが更新可能です。
UPDATE Users SET Name = 'Test', Role = 'user', IsExemptFromDeviceLimits = false WHERE Id = '111'
Users は、Id を指定してDELETE ステートメントを発行することで削除できます。
DELETE FROM Users WHERE Id = '111'
Name | Type | ReadOnly | Description |
Id [KEY] | String | True |
The Id of the user. When selecting you can set this to the value me to retrieve information for the logged-user. |
Login | String | False |
The login of the user. |
Name | String | False |
The name of the user. |
EnterpriseId | String | False |
The id of the user's enterprise. Set this to null to disassociate the user from the enterprise. |
Role | String | False |
The role of the user. |
Language | String | False |
The preferred language of the user. |
IsSyncEnabled | Boolean | False |
If the user is allowed to use Box Sync or not. |
JobTitle | String | False |
The job title of the user. |
Phone | String | False |
The phone of the user. |
Address | String | False |
The address of the user. |
SpaceAmount | Long | False |
The amount of space the user is allowed to use. |
SpaceUsed | Long | False |
The amount of space the user has used. |
MaxUploadSize | Long | False |
The maximum upload size the user is allowed to upload. |
TrackingCodes | String | False |
The tracking codes of the user, separated by commas. |
CanSeeManagedUsers | Boolean | False |
The date the content of the user was created at. |
TimeZone | String | False |
The preferred timezone of the user. |
IsExemptFromDeviceLimits | Boolean | False |
If the user is exempt from device limitations or not. |
IsExemptFromLoginVerification | Boolean | False |
If the user is exempt from login verification or not. |
Status | String | False |
The status of the user. |
IsPasswordResetRequired | Boolean | False |
If the user should be asked to change his password on the next login or not. |
CreatedAt | Datetime | True |
The date the user was created. |
ModifiedAt | Datetime | True |
The date the user was modified. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
Name | Type | Description |
AsUserId | String |
The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |
ビューは、カラムと疑似カラムで構成されます。ビューは、データを示すという点でテーブルに似ていますが、ビューでは更新はサポートされません。通常、ビューとして表されるエンティティは、読み取り専用のエンティティです。多くの場合、これらのデータはストアドプロシージャを使用することで更新できます(その機能がデータソースに適用できる場合)。
ビューに対しては、通常のテーブルと同じようにクエリを実行でき、このときに返されるデータも同様です。
ビューとして公開されるクエリなどの動的ビューや、project_team ワークアイテムの特定の組み合わせを検索するためのビューがサポートされています。
Name | Description |
FileMetadataInstances | Retrieves all metadata instances fields applied to a given file. |
FileVersions | Query the available file versions in the box. |
SharedItems | Query the available shared items in Box. |
UserEvents | Query the available Events in Box. |
Retrieves all metadata instances fields applied to a given file.
Name | Type | Description |
Id | String | A UUID to identify the metadata instance. |
FileId [KEY] | String | The ID of the file. |
Template | String | The name of the template. |
Parent | String | The identifier of the item that this metadata instance has been attached to. This combines the type and the id of the parent in the form {type}_{id}. |
Scope | String | An ID for the scope in which this template has been applied. This will be enterprise_{enterprise_id} for templates defined for use in this enterprise, and global for general templates that are available to all enterprises using Box. |
Version | String | The version of the metadata instance. This version starts at 0 and increases every time a user-defined property is modified. |
CanEdit | String | Whether the user can edit this metadata instance. |
Type | String | A unique identifier for the type. |
TypeVersion | String | The last-known version of the template of the object. |
UserDefinedFieldName | String | The user-defined field name. |
UserDefinedFieldValue | String | The value of the user defined field. |
Query the available file versions in the box.
File Versions contains information about older versions of a file. This table supports only SELECT operation.
FileId is required to search all the FileVersions in your files.
SELECT * FROM FileVersions WHERE FileId='585442984153'
Name | Type | Description |
Id [KEY] | String | The ID of the file version. |
FileId | String | The ID of the file. |
CreatedAt | Datetime | The date the content of the file was created at. |
ModifiedAt | Datetime | The date the content of the file was modified at. |
ModifiedById | String | The Id of the user that last modified the file. |
ModifiedByName | String | The Name of the user that last modified the file. |
ModifiedByLogin | String | The Login of the user that last modified the file. |
ModifiedByType | String | The Type of the user that last modified the file. |
Name | String | The name of the file. |
PurgedAt | Datetime | The date the content of the file was purged at. |
RestoredAt | Datetime | The date the content of the file was modified at. |
RestoredById | String | The Id of the user that last modified the file. |
RestoredByLogin | String | The Name of the user that last modified the file. |
RestoredByName | String | The Login of the user that last modified the file. |
RestoredByType | String | The Type of the user that last modified the file. |
Sha1 | String | The SHA-1 encryption of the file version. |
Size | Int64 | The size of the file version. |
TrashedAt | Datetime | The date the file version was trashed at. |
TrashedById | String | The Id of the user that trashed the file. |
TrashedByLogin | String | The Name of the user that trashed the file. |
TrashedByName | String | The Login of the user that trashed the file. |
TrashedByType | String | The Type of the user that trashed the file. |
Type | String | Type of file versions. |
AsUserId | String | The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |
Query the available Events in Box.
User events はユーザーアカウントで変更後に保存されたログです。
カレントユーザーのすべてのイベントをクエリします:
SELECT * FROM UserEvents
Name | Type | Description |
Id [KEY] | String | The Id of the event. |
SourceId | String | The Id of the source that triggered the event. |
SourceType | String | The type of the source that triggered the event. |
CreatedById | String | The Id of the user that created the event. |
CreatedByName | String | The Name of the user that created the event. |
CreatedByLogin | String | The Login of the user that created the event. |
CreatedAt | Datetime | The date the event was created at. This can only be used when requesting the events with a StreamType of admin_logs |
RecordedAt | Datetime | The date the event was recorded at. |
SessionId | String | The Id of the session of the event. |
EventType | String | The type of the event. |
ClassificationName | String | The classification name of the event. |
AsUserId | String | The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts. |
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。
Name | Type | Description |
StreamType | String | The type of events to stream.
使用できる値は次のとおりです。all, changes, sync, admin_logs |
プロパティ | 説明 |
AuthScheme | The type of authentication to use when connecting to Box. |
ImpersonateUserMode | Specify the type of the user impersonation. It should be whether the User mode or the Admin mode. |
プロパティ | 説明 |
OAuthClientId | OAuth 認証サーバーを使用してアプリケーションを登録する場合に割り当てられたクライアントId。 |
OAuthClientSecret | OAuth 認証サーバーにアプリケーションを登録する場合に割り当てられたクライアントシークレット。 |
プロパティ | 説明 |
OAuthJWTCert | JWT 証明書のストア。 |
OAuthJWTCertType | JWT 証明書を格納するキーストアの種類。 |
OAuthJWTCertPassword | OAuth JWT 証明書のパスワード。 |
OAuthJWTCertSubject | OAuth JWT 証明書のサブジェクト。 |
OAuthJWTIssuer | Java Web Token の発行者。 |
OAuthJWTSubject | アプリケーションからデリゲートアクセスの要求対象となるユーザーサブジェクト。 |
OAuthJWTSubjectType | JWT 認証のサブタイプ。 |
OAuthJWTPublicKeyId | JWT の公開キーのID。 |
プロパティ | 説明 |
SSLServerCert | TLS/SSL を使用して接続するときに、サーバーが受け入れ可能な証明書。 |
プロパティ | 説明 |
FirewallType | プロキシベースのファイアウォールで使われるプロトコル。 |
FirewallServer | プロキシベースのファイアウォールの名前もしくはIP アドレス。 |
FirewallPort | プロキシベースのファイアウォールのTCP ポート。 |
FirewallUser | プロキシベースのファイアウォールに認証するために使うユーザー名。 |
FirewallPassword | プロキシベースのファイアウォールへの認証に使われるパスワード。 |
プロパティ | 説明 |
ProxyAutoDetect | これは、システムプロキシ設定を使用するかどうかを示します。これは他のプロキシ設定よりも優先されるため、カスタムプロキシ設定を使用するにはProxyAutoDetect をFALSE に設定する必要があります。 |
ProxyServer | HTTP トラフィックをルートするためのプロキシのホストネームもしくはIP アドレス。 |
ProxyPort | ProxyServer プロキシが起動しているTCP ポート。 |
ProxyAuthScheme | ProxyServer プロキシへの認証で使われる認証タイプ。 |
ProxyUser | ProxyServer プロキシへの認証に使われるユーザー名。 |
ProxyPassword | ProxyServer プロキシへの認証に使われるパスワード。 |
ProxySSLType | ProxyServer プロキシへの接続時に使用するSSL タイプ。 |
ProxyExceptions | ProxyServer 経由での接続が免除される宛先ホスト名またはIP のセミコロン区切りのリスト。 |
プロパティ | 説明 |
LogModules | ログファイルに含めるコアモジュール。 |
プロパティ | 説明 |
Location | テーブル、ビュー、およびストアドプロシージャを定義するスキーマファイルを格納するディレクトリへのパス。 |
BrowsableSchemas | このプロパティは、使用可能なスキーマのサブセットにレポートされるスキーマを制限します。例えば、BrowsableSchemas=SchemaA,SchemaB,SchemaC です。 |
Tables | このプロパティは、使用可能なテーブルのサブセットにレポートされるテーブルを制限します。例えば、Tables=TableA,TableB,TableC です。 |
Views | 使用可能なテーブルのサブセットにレポートされるビューを制限します。例えば、Views=ViewA,ViewB,ViewC です。 |
プロパティ | 説明 |
DirectoryRetrievalDepth | Folders およびFiles テーブルをクエリするフォルダの深度レベル。 |
IncludeCustomFields | メタデータテンプレートをFiles テーブルのカスタムカラムとして公開する必要がある場合にはtrue に設定します。 |
MaxRows | クエリで集計またはグループ化を使用しない場合に返される行数を制限します。これにより、設計時にパフォーマンスの問題を回避できます。 |
Other | これらの隠しプロパティは特定のユースケースでのみ使用されます。 |
PseudoColumns | このプロパティは、テーブルのカラムとして疑似カラムが含まれているかどうかを示します。 |
Timeout | タイムアウトエラーがスローされ、処理をキャンセルするまでの秒数。 |
UserDefinedViews | カスタムビューを含むJSON コンフィギュレーションファイルを指すファイルパス。 |
このセクションでは、本プロバイダーの接続文字列で設定可能なAuthentication プロパティの全リストを提供します。
プロパティ | 説明 |
AuthScheme | The type of authentication to use when connecting to Box. |
ImpersonateUserMode | Specify the type of the user impersonation. It should be whether the User mode or the Admin mode. |
The type of authentication to use when connecting to Box.
Specify the type of the user impersonation. It should be whether the User mode or the Admin mode.
Specify the type of the user impersonation. It should be whether the User mode or the Admin mode. The Admin mode is available only for Enterprise with Governance accounts and will be upon request. It will not work for any other accounts.
このセクションでは、本プロバイダーの接続文字列で設定可能なOAuth プロパティの全リストを提供します。
プロパティ | 説明 |
OAuthClientId | OAuth 認証サーバーを使用してアプリケーションを登録する場合に割り当てられたクライアントId。 |
OAuthClientSecret | OAuth 認証サーバーにアプリケーションを登録する場合に割り当てられたクライアントシークレット。 |
OAuth 認証サーバーを使用してアプリケーションを登録する場合に割り当てられたクライアントId。
OAuth アプリケーションの登録の一環として、コンシューマキーとも呼ばれるOAuthClientId 値、およびクライアントシークレットOAuthClientSecret が提供されます。
OAuth 認証サーバーにアプリケーションを登録する場合に割り当てられたクライアントシークレット。
OAuth アプリケーションの登録の一環として、コンシューマキーとも呼ばれるOAuthClientId が提供されます。また、コンシューマーシークレットと呼ばれるクライアントシークレットも提供されます。クライアントシークレットをOAuthClientSecret プロパティに設定します。
このセクションでは、本プロバイダーの接続文字列で設定可能なJWT OAuth プロパティの全リストを提供します。
プロパティ | 説明 |
OAuthJWTCert | JWT 証明書のストア。 |
OAuthJWTCertType | JWT 証明書を格納するキーストアの種類。 |
OAuthJWTCertPassword | OAuth JWT 証明書のパスワード。 |
OAuthJWTCertSubject | OAuth JWT 証明書のサブジェクト。 |
OAuthJWTIssuer | Java Web Token の発行者。 |
OAuthJWTSubject | アプリケーションからデリゲートアクセスの要求対象となるユーザーサブジェクト。 |
OAuthJWTSubjectType | JWT 認証のサブタイプ。 |
OAuthJWTPublicKeyId | JWT の公開キーのID。 |
JWT 証明書のストア。
クライアント証明書のための証明書ストア名。
OAuthJWTCertType フィールドは、OAuthJWTCert により指定された証明書ストアの種類を指定します。 ストアがパスワードで保護されている場合は、OAuthJWTCertPassword でパスワードを指定します。
OAuthJWTCert は、OAuthJWTCertSubject フィールドとともにクライアント証明書を指定するために使われます。 OAuthJWTCert に値がある場合で、OAuthJWTCertSubject が設定されている場合は、証明書の検索が始まります。 詳しくは、OAuthJWTCertSubject フィールドを参照してください。
証明書ストアの指定はプラットフォームに依存します。
Windows の共通のユーザとシステム証明書ストアの指定は以下のとおりです。
MY | 個人証明書と関連付けられた秘密キーを格納している証明書ストア。 |
CA | 証明機関の証明書。 |
ROOT | ルート証明書。 |
SPC | ソフトウェア発行元証明書。 |
Javaでは、証明書ストアは通常、証明書および任意の秘密キーを含むファイルです。
証明書ストアの種類がPFXFile の場合は、このプロパティにファイル名を設定します。 PFXBlob の場合は、このプロパティをPFX ファイルのバイナリコンテンツ(例えば、PKCS12証明書ストア)に設定する必要があります。
JWT 証明書を格納するキーストアの種類。
このプロパティには次の値の一つを設定できます。
USER | Windows の場合、現在のユーザーにより所有された証明書ストアであることを指定します。 Note:この種類はJava では利用できません。 |
MACHINE | Windows の場合、この証明書ストアがシステムストアであることを指定します。 Note:この種類はJava では利用できません。 |
PFXFILE | この証明書ストアは、証明書を含むPFX(PKCS12)ファイルの名前です。 |
PFXBLOB | この証明書ストアは、PFX(PKCS12)形式の証明書ストアを表すBase-64でエンコードされた文字列です。 |
JKSFILE | この証明書ストアは、証明書を含むJava key store(JKS)ファイルの名前です。 Note:この種類はJava のみで利用できます。 |
JKSBLOB | この証明書ストアは、Java key store(JKS)形式の証明書ストアを表すBase-64でエンコードされた文字列です。 Note:この種類はJava のみで利用できます。 |
PEMKEY_FILE | この証明書ストアは、秘密キーと任意の証明書を含むPEM でエンコードされたファイルの名前です。 |
PEMKEY_BLOB | この証明書ストアは、秘密キーと任意の証明書を含むBase-64でエンコードされた文字列です。 |
PUBLIC_KEY_FILE | この証明書ストアは、PEM またはDER でエンコードされた公開キーの証明書を含むファイルの名前です。 |
PUBLIC_KEY_BLOB | この証明書ストアは、PEM またはDER でエンコードされた公開キーの証明書を含むBase-64でエンコードされた文字列です。 |
SSHPUBLIC_KEY_FILE | この証明書ストアは、SSH 公開キーを含むファイルの名前です。 |
SSHPUBLIC_KEY_BLOB | この証明書ストアは、SSH 公開キーを含むBase-64でエンコードされた文字列です。 |
P7BFILE | この証明書ストアは、証明書を含むPKCS7 ファイルの名前です。 |
PPKFILE | この証明書ストアは、PuTTY 秘密キー(PPK)を含むファイルの名前です。 |
XMLFILE | この証明書ストアは、XML 形式の証明書を含むファイルの名前です。 |
XMLBLOB | この証明書ストアは、XML 形式の証明書を含む文字列の名前です。 |
OAuth JWT 証明書のパスワード。
証明書ストアでパスワードが必要である場合、このプロパティを使用してパスワードを指定し、証明書ストアにアクセスできます。
OAuth JWT 証明書のサブジェクト。
証明書のサブジェクトは、証明書をロードするときにストア内の証明書を検索するために使用されます。
完全に一致するものが見つからない場合、ストアはプロパティの値を含むサブジェクトを検索します。
それでも一致するものが見つからない場合、プロパティは空白で設定され、証明書は選択されません。
"*" に設定すると、証明書ストアの1番目の証明書が選択されます。
証明書のサブジェクトは識別の名前フィールドおよび値のカンマ区切りのリストです。 例えば、"CN=www.server.com, OU=test, C=US, [email protected]"。共通のフィールドとその説明は以下のとおりです。
フィールド | 説明 |
CN | 共通名。一般的には、www.server.com のようなホスト名です。 |
O | 法人名 |
OU | 法人の部署名 |
L | 法人の住所(市町村名) |
S | 法人の住所(都道府県) |
C | 国名 |
E | Eメールアドレス |
フィールド値にカンマが含まれている場合は、それを引用符で囲む必要があります。
Java Web Token の発行者。
Java Web Token の発行者。通常は、OAuth アプリケーションのクライアントId またはE メールアドレスとなります。
アプリケーションからデリゲートアクセスの要求対象となるユーザーサブジェクト。
アプリケーションからデリゲートアクセスの要求対象となるユーザーサブジェクトです。通常は、ユーザーのアカウント名またはE メールアドレスとなります。
JWT 認証のサブタイプ。
JWT 認証のサブタイプ。要求されているトークンの種類に応じて[enterprise]または[user]に設定します。
JWT の公開キーのID。
JWT の公開キーのID。アプリケーション設定の公開キーID の値に設定します。
このセクションでは、本プロバイダーの接続文字列で設定可能なSSL プロパティの全リストを提供します。
プロパティ | 説明 |
SSLServerCert | TLS/SSL を使用して接続するときに、サーバーが受け入れ可能な証明書。 |
TLS/SSL を使用して接続するときに、サーバーが受け入れ可能な証明書。
TLS/SSL 接続を使用する場合は、このプロパティを使用して、サーバーが受け入れるTLS/SSL 証明書を指定できます。コンピュータによって信頼されていない他の証明書はすべて拒否されます。
このプロパティは、次のフォームを取ります:
説明 | 例 |
フルPEM 証明書(例では省略されています) | -----BEGIN CERTIFICATE----- MIIChTCCAe4CAQAwDQYJKoZIhv......Qw== -----END CERTIFICATE----- |
証明書を保有するローカルファイルへのパス。 | C:\cert.cer |
公開鍵(例では省略されています) | -----BEGIN RSA PUBLIC KEY----- MIGfMA0GCSq......AQAB -----END RSA PUBLIC KEY----- |
MD5 Thumbprint (hex 値はスペースおよびコロン区切り) | ecadbdda5a1529c58a1e9e09828d70e4 |
SHA1 Thumbprint (hex 値はスペースおよびコロン区切り) | 34a929226ae0819f2ec14b4a3d904f801cbb150d |
これを指定しない場合は、マシンが信用するすべての証明書が受け入れられます。
すべての証明書の受け入れを示すには、'*'を使用します。セキュリティ上の理由から、これはお勧めできません。
このセクションでは、本プロバイダーの接続文字列で設定可能なFirewall プロパティの全リストを提供します。
プロパティ | 説明 |
FirewallType | プロキシベースのファイアウォールで使われるプロトコル。 |
FirewallServer | プロキシベースのファイアウォールの名前もしくはIP アドレス。 |
FirewallPort | プロキシベースのファイアウォールのTCP ポート。 |
FirewallUser | プロキシベースのファイアウォールに認証するために使うユーザー名。 |
FirewallPassword | プロキシベースのファイアウォールへの認証に使われるパスワード。 |
プロキシベースのファイアウォールで使われるプロトコル。
このプロパティは、Sync App がFirewallServer プロキシ経由でトンネルトラフィックを使うためのプロトコルを指定します。デフォルトでは、Sync App はシステムプロキシに接続します。この動作を無効化し次のプロキシタイプのどれかで接続するには、ProxyAutoDetect をfalse に設定します。
タイプ | デフォルトポート | 説明 |
TUNNEL | 80 | これが設定されている場合、Sync App はBox への接続を開き、プロキシを経由して通信が行われます。 |
SOCKS4 | 1080 | これが設定されている場合、Sync App はデータをFirewallServer およびFirewallPort で指定されたSOCS 4 プロキシ経由で送信し、接続リクエストが許容されるかどうかを決定します。 |
SOCKS5 | 1080 | これが設定されている場合、Sync App はデータをFirewallServer およびFirewallPort で指定されたSOCS 5 プロキシ経由で送信します。プロキシに認証が必要な場合には、FirewallUser およびFirewallPassword をプロキシが認識する認証情報に設定します。 |
HTTP プロキシへの接続には、ProxyServer およびProxyPort ポートを使ってください。HTTP プロキシへの認証には、ProxyAuthScheme、ProxyUser、およびProxyPassword を使ってください。
プロキシベースのファイアウォールの名前もしくはIP アドレス。
ファイアウォールトラバーサルを許容するために設定するIP アドレス、DNS 名、もしくはプロキシホスト名を指定するプロパティです。プロトコルはFirewallType で指定されます。このプロパティとFirewallServer を使って、SOCKS 経由での接続、もしくはトンネリングが可能です。HTTP プロキシへの接続には、ProxyServer を使用します。
Sync App はデフォルトでシステムプロキシを使うので注意してください。他のプロキシを使う場合には、ProxyAutoDetect をfalse に設定してください。
プロキシベースのファイアウォールのTCP ポート。
ファイアウォールトラバーサルを許容するために設定するプロキシベースのファイアウォールのTCP ポート。名前もしくはIP アドレスを指定するには、FirewallServer を使います。FirewallType でプロトコルを指定します。
プロキシベースのファイアウォールに認証するために使うユーザー名。
FirewallUser およびFirewallPassword プロパティは、FirewallType により指定された認証方式に則り、FirewallServer、およびFirewallPort で指定されたプロキシに対しての認証に使われます。
プロキシベースのファイアウォールへの認証に使われるパスワード。
このプロパティは、FirewallType により指定された認証メソッドに則り、FirewallServer およびFirewallPort で指定されたプロキシに渡されます。
このセクションでは、本プロバイダーの接続文字列で設定可能なProxy プロパティの全リストを提供します。
プロパティ | 説明 |
ProxyAutoDetect | これは、システムプロキシ設定を使用するかどうかを示します。これは他のプロキシ設定よりも優先されるため、カスタムプロキシ設定を使用するにはProxyAutoDetect をFALSE に設定する必要があります。 |
ProxyServer | HTTP トラフィックをルートするためのプロキシのホストネームもしくはIP アドレス。 |
ProxyPort | ProxyServer プロキシが起動しているTCP ポート。 |
ProxyAuthScheme | ProxyServer プロキシへの認証で使われる認証タイプ。 |
ProxyUser | ProxyServer プロキシへの認証に使われるユーザー名。 |
ProxyPassword | ProxyServer プロキシへの認証に使われるパスワード。 |
ProxySSLType | ProxyServer プロキシへの接続時に使用するSSL タイプ。 |
ProxyExceptions | ProxyServer 経由での接続が免除される宛先ホスト名またはIP のセミコロン区切りのリスト。 |
これは、システムプロキシ設定を使用するかどうかを示します。これは他のプロキシ設定よりも優先されるため、カスタムプロキシ設定を使用するにはProxyAutoDetect をFALSE に設定する必要があります。
これは他のプロキシ設定よりも優先されるため、カスタムプロキシ設定を使用するにはProxyAutoDetect をFALSE に設定する必要があります。
HTTP プロキシへの接続には、ProxyServer を参照してください。SOCKS やトンネリングなどの他のプロキシには、FirewallType を参照してください。
HTTP トラフィックをルートするためのプロキシのホストネームもしくはIP アドレス。
HTTP トラフィックをルートするためのプロキシのホストネームもしくはIP アドレス。HTTP プロキシへの認証には、Sync App はHTTP、Windows(NTLM)、もしくはKerberos 認証タイプを使用することができます。
SOCKS プロキシを経由して接続する、もしくは接続をトンネルするには、FirewallType を参照してください。
デフォルトで、Sync App はsystem プロキシを使います。他のプロキシを使う場合には、ProxyAutoDetect をfalse に設定します。
ProxyServer プロキシが起動しているTCP ポート。
HTTP トラフィックをリダイレクトするHTTP プロキシが実行されているポート。ProxyServer でHTTP プロキシを指定します。その他のプロキシタイプについては、FirewallType を参照してください。
ProxyServer プロキシへの認証で使われる認証タイプ。
この値は、ProxyServer およびProxyPort で指定されるHTTP プロキシに認証するために使われる認証タイプを指定します。
Sync App は、デフォルトでsystem proxy settings を使い、追加での設定が不要です。他のプロキシへの接続をする場合には、ProxyServer およびProxyPort に加え、ProxyAutoDetect をfalse に設定します。認証するには、ProxyAuthScheme を設定し、必要な場合にはProxyUser およびProxyPassword を設定します。
認証タイプは、次のどれかになります。
SOCKS 5 認証のような他の認証タイプを使用するには、FirewallType を参照してください。
ProxyServer プロキシへの認証に使われるユーザー名。
ProxyUser および ProxyPassword オプションは、ProxyServer で指定されたHTTP プロキシに対して接続および認証するために使用されます。
ProxyAuthScheme で使用可能な認証タイプを選択することができます。HTTP 認証を使う場合、これをHTTP プロキシで識別可能なユーザーのユーザー名に設定します。Windows もしくはKerberos 認証を使用する場合、このプロパティを次の形式のどれかでユーザー名に設定します。
user@domain domain\user
ProxyServer プロキシへの認証に使われるパスワード。
このプロパティは、NTLM(Windows)、Kerberos、もしくはHTTP 認証をサポートするHTTP プロキシサーバーに認証するために使われます。HTTP プロキシを指定するためには、ProxyServer およびProxyPort を設定します。認証タイプを指定するためにはProxyAuthScheme を設定します。
HTTP 認証を使う場合、さらにHTTP プロキシにProxyUser およびProxyPassword を設定します。
NTLM 認証を使う場合、Windows パスワードにProxyUser およびProxyPassword を設定します。Kerberos 認証には、これらを入力する必要があります。
SOCKS 5 認証もしくは、トンネリングは、FirewallType を参照してください。
デフォルトで、Sync App はsystem プロキシを使います。他のプロキシに接続する場合には、これをfalse に設定します。
ProxyServer プロキシへの接続時に使用するSSL タイプ。
このプロパティは、ProxyServer で指定されたHTTP プロキシへの接続にSSL を使用するかどうかを決定します。この値は、AUTO、ALWAYS、NEVER、TUNNEL のいずれかです。有効な値は次のとおりです。
AUTO | デフォルト設定。URL がHTTPS URL の場合、Sync App は、TUNNEL オプションを使います。URL がHTTP URL の場合、コンポーネントはNEVER オプションを使います。 |
ALWAYS | 接続は、常にSSL 有効となります。 |
NEVER | 接続は、SSL 有効になりません。 |
TUNNEL | 接続は、トンネリングプロキシを経由します。プロキシサーバーがリモートホストへの接続を開き、プロキシを経由して通信が行われます。 |
ProxyServer 経由での接続が免除される宛先ホスト名またはIP のセミコロン区切りのリスト。
ProxyServer は、このプロパティで定義されたアドレスを除くすべてのアドレスに使用されます。セミコロンを使用してエントリを区切ります。
Sync App は、追加設定なしにデフォルトでシステムのプロキシ設定を使います。この接続のプロキシ例外を明示的に構成するには、ProxyAutoDetect をfalse に設定して、ProxyServer およびProxyPort を設定する必要があります。認証するには、ProxyAuthScheme を設定し、必要な場合にはProxyUser およびProxyPassword を設定します。
ログファイルに含めるコアモジュール。
指定された(';' で区切られた)モジュールのみがログファイルに含まれます。デフォルトではすべてのモジュールが含まれます。
概要はログ ページを参照してください。
このセクションでは、本プロバイダーの接続文字列で設定可能なSchema プロパティの全リストを提供します。
プロパティ | 説明 |
Location | テーブル、ビュー、およびストアドプロシージャを定義するスキーマファイルを格納するディレクトリへのパス。 |
BrowsableSchemas | このプロパティは、使用可能なスキーマのサブセットにレポートされるスキーマを制限します。例えば、BrowsableSchemas=SchemaA,SchemaB,SchemaC です。 |
Tables | このプロパティは、使用可能なテーブルのサブセットにレポートされるテーブルを制限します。例えば、Tables=TableA,TableB,TableC です。 |
Views | 使用可能なテーブルのサブセットにレポートされるビューを制限します。例えば、Views=ViewA,ViewB,ViewC です。 |
テーブル、ビュー、およびストアドプロシージャを定義するスキーマファイルを格納するディレクトリへのパス。
Sync App のスキーマファイル(テーブルとビューの場合は.rsd ファイル、ストアドプロシージャの場合は.rsb ファイル)を含むディレクトリへのパス。このフォルダの場所は、実行ファイルの場所からの相対パスにすることができます。Location プロパティは、定義をカスタマイズしたり(例えば、カラム名を変更する、カラムを無視するなど)、新しいテーブル、ビュー、またはストアドプロシージャでデータモデルを拡張する場合にのみ必要です。
指定しない場合、デフォルトの場所は"%APPDATA%\\CData\\Box Data Provider\\Schema" となり、%APPDATA% はユーザーのコンフィギュレーションディレクトリに設定されます:
このプロパティは、使用可能なスキーマのサブセットにレポートされるスキーマを制限します。例えば、BrowsableSchemas=SchemaA,SchemaB,SchemaC です。
スキーマをデータベースからリストすると、負荷がかかる可能性があります。接続文字列でスキーマのリストを提供すると、 パフォーマンスが向上します。
このプロパティは、使用可能なテーブルのサブセットにレポートされるテーブルを制限します。例えば、Tables=TableA,TableB,TableC です。
テーブルを複数のデータベースからリストすると、負荷がかかる可能性があります。接続文字列でテーブルのリストを提供すると、Sync App のパフォーマンスが向上します。
このプロパティは、作業したいビューがすでにわかっていて、ビューが多すぎる場合に、ビューを自動的にリストする代わりに使用することもできます。
カンマ区切りのリストで使用したいテーブルを指定します。各テーブルは、角かっこ、二重引用符、またはバッククオートを使用してエスケープされた特殊文字列を含む有効なSQL 識別子である必要があります。 例えば、Tables=TableA,[TableB/WithSlash],WithCatalog.WithSchema.`TableC With Space` です。
複数のスキーマまたはカタログを持つデータソースに接続する場合は、複数のカタログやスキーマに存在するテーブル間の曖昧さを避けるため、最後の例のように、このプロパティにテーブルの完全修飾名を指定する必要があることに注意してください。
使用可能なテーブルのサブセットにレポートされるビューを制限します。例えば、Views=ViewA,ViewB,ViewC です。
ビューを複数のデータベースからリストすると、負荷がかかる可能性があります。接続文字列でビューのリストを提供すると、Sync App のパフォーマンスが向上します。
このプロパティは、作業したいビューがすでにわかっていて、ビューが多すぎる場合に、ビューを自動的にリストする代わりに使用することもできます。
カンマ区切りのリストで使用したいビューを指定します。各ビューは、角かっこ、二重引用符、またはバッククオートを使用してエスケープされた特殊文字列を含む有効なSQL 識別子である必要があります。 例えば、Views=ViewA,[ViewB/WithSlash],WithCatalog.WithSchema.`ViewC With Space` です。
複数のスキーマまたはカタログを持つデータソースに接続する場合は、複数のカタログやスキーマに存在するテーブル間の曖昧さを避けるため、最後の例のように、このプロパティにテーブルの完全修飾名を指定する必要があることに注意してください。
このセクションでは、本プロバイダーの接続文字列で設定可能なMiscellaneous プロパティの全リストを提供します。
プロパティ | 説明 |
DirectoryRetrievalDepth | Folders およびFiles テーブルをクエリするフォルダの深度レベル。 |
IncludeCustomFields | メタデータテンプレートをFiles テーブルのカスタムカラムとして公開する必要がある場合にはtrue に設定します。 |
MaxRows | クエリで集計またはグループ化を使用しない場合に返される行数を制限します。これにより、設計時にパフォーマンスの問題を回避できます。 |
Other | これらの隠しプロパティは特定のユースケースでのみ使用されます。 |
PseudoColumns | このプロパティは、テーブルのカラムとして疑似カラムが含まれているかどうかを示します。 |
Timeout | タイムアウトエラーがスローされ、処理をキャンセルするまでの秒数。 |
UserDefinedViews | カスタムビューを含むJSON コンフィギュレーションファイルを指すファイルパス。 |
Folders およびFiles テーブルをクエリするフォルダの深度レベル。
このプロパティは接続文字列で設定する必要があります。設定しない場合、ドライバーはデフォルトのDepth=5 を使用します。
メタデータテンプレートをFiles テーブルのカスタムカラムとして公開する必要がある場合にはtrue に設定します。
メタデータテンプレートをFiles テーブルのカスタムカラムとして公開する必要がある場合にはtrue に設定します。
クエリで集計またはグループ化を使用しない場合に返される行数を制限します。これにより、設計時にパフォーマンスの問題を回避できます。
クエリで集計またはグループ化を使用しない場合に返される行数を制限します。これにより、設計時にパフォーマンスの問題を回避できます。
これらの隠しプロパティは特定のユースケースでのみ使用されます。
以下にリストされているプロパティは、特定のユースケースで使用可能です。通常のドライバーのユースケースおよび機能では、これらのプロパティは必要ありません。
複数のプロパティをセミコロン区切りリストで指定します。
DefaultColumnSize | データソースがメタデータにカラムの長さを提供しない場合に、文字列フィールドのデフォルトの長さを設定します。デフォルト値は2000です。 |
ConvertDateTimeToGMT | 日時の値を、マシンのローカルタイムではなくGMT グリニッジ標準時に変換するかどうかを決定します。 |
RecordToFile=filename | 基底のソケットデータ転送を指定のファイルに記録します。 |
このプロパティは、テーブルのカラムとして疑似カラムが含まれているかどうかを示します。
Entity Framework ではテーブルカラムでない疑似カラムに値を設定できないため、この設定はEntity Framework で特に便利です。この接続設定の値は、"Table1=Column1, Table1=Column2, Table2=Column3" の形式です。"*=*" のように"*" 文字を使用して、すべてのテーブルとすべてのカラムを含めることができます。
タイムアウトエラーがスローされ、処理をキャンセルするまでの秒数。
Timeout が0に設定されている場合は、操作がタイムアウトしません。処理が正常に完了するか、エラー状態になるまで実行されます。
Timeout の有効期限が切れても処理が完了していない場合は、Sync App は例外をスローします。
カスタムビューを含むJSON コンフィギュレーションファイルを指すファイルパス。
ユーザー定義ビューは、UserDefinedViews.json というJSON 形式のコンフィギュレーションファイルで定義されています。Sync App は、このファイルで指定されたビューを自動的に検出します。
また、複数のビュー定義を持ち、UserDefinedViews 接続プロパティを使用して制御することも可能です。このプロパティを使用すると、指定されたビューのみがSync App によって検知されます。
このユーザー定義ビューのコンフィギュレーションファイルは、次のようにフォーマットされています。
次に例を示します。
{ "MyView": { "query": "SELECT * FROM Files WHERE MyColumn = 'value'" }, "MyView2": { "query": "SELECT * FROM MyTable WHERE Id IN (1,2,3)" } }UserDefinedViews 接続プロパティを使用して、JSON コンフィギュレーションファイルの場所を指定します。次に例を示します。
"UserDefinedViews", "C:\\Users\\yourusername\\Desktop\\tmp\\UserDefinedViews.json"