ドメインへのコラボレーションの許可

ドメインへのコラボレーションの許可

一般にコラボレーションの作成を制限している会社は、社内に作成されている可能性のあるコラボレーションのリストにexample.comなどのドメインを追加できます。

cURL
curl -X POST https://api.box.com/2.0/collaboration_whitelist_entries \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
     -H 'Content-Type: application/json'
     -d '{
       "domain": "example.com",
       "direction": "inboud"
     }'
cURL
curl -X POST https://api.box.com/2.0/collaboration_whitelist_entries \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
     -H 'Content-Type: application/json'
     -d '{
       "domain": "example.com",
       "direction": "inboud"
     }'
.NET
BoxCollaborationWhitelistEntry entry = await client.CollaborationWhitelistManager.AddCollaborationWhitelistEntryAsync(
    "example.com",
    "both"
);
.NET
BoxCollaborationWhitelistEntry entry = await client.CollaborationWhitelistManager.AddCollaborationWhitelistEntryAsync(
    "example.com",
    "both"
);
Java
BoxCollaborationWhitelist.create(api, "test.com", BoxCollaborationWhitelist.WhitelistDirection.BOTH);
Java
BoxCollaborationWhitelist.create(api, "test.com", BoxCollaborationWhitelist.WhitelistDirection.BOTH);
Python
from boxsdk.object.collaboration_whitelist import WhitelistDirection
domain = 'example.com'
whitelist_entry = client.collaboration_whitelist().add_domain(domain, direction=WhitelistDirection.INBOUND)
Python
from boxsdk.object.collaboration_whitelist import WhitelistDirection
domain = 'example.com'
whitelist_entry = client.collaboration_whitelist().add_domain(domain, direction=WhitelistDirection.INBOUND)
Node
client.collaborationWhitelist.addDomain('test.com', client.collaborationWhitelist.directions.INBOUND, callback);
Node
client.collaborationWhitelist.addDomain('test.com', client.collaborationWhitelist.directions.INBOUND, callback);

このエンドポイントには、コラボレーションを許可するdomainと、以下のように設定できるdirectionが必要です。

  • inbound: 外部ユーザーが社内のコンテンツでコラボレーションできるかどうか。
  • outbound: 社内の管理対象ユーザーが外部の会社内で所有されているコンテンツでコラボレーションできるかどうか。
  • both: 上記の両方。

新しく許可されたドメインを設定する場合はbothパラメータを指定します。

cURL
curl -X POST https://api.box.com/2.0/collaboration_whitelist_entries \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
     -H 'Content-Type: application/json'
     -d '{
       "domain": "example.com",
       "direction": "inboud"
     }'
cURL
curl -X POST https://api.box.com/2.0/collaboration_whitelist_entries \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
     -H 'Content-Type: application/json'
     -d '{
       "domain": "example.com",
       "direction": "inboud"
     }'
.NET
BoxCollaborationWhitelistEntry entry = await client.CollaborationWhitelistManager.AddCollaborationWhitelistEntryAsync(
    "example.com",
    "both"
);
.NET
BoxCollaborationWhitelistEntry entry = await client.CollaborationWhitelistManager.AddCollaborationWhitelistEntryAsync(
    "example.com",
    "both"
);
Java
BoxCollaborationWhitelist.create(api, "test.com", BoxCollaborationWhitelist.WhitelistDirection.BOTH);
Java
BoxCollaborationWhitelist.create(api, "test.com", BoxCollaborationWhitelist.WhitelistDirection.BOTH);
Python
from boxsdk.object.collaboration_whitelist import WhitelistDirection
domain = 'example.com'
whitelist_entry = client.collaboration_whitelist().add_domain(domain, direction=WhitelistDirection.INBOUND)
Python
from boxsdk.object.collaboration_whitelist import WhitelistDirection
domain = 'example.com'
whitelist_entry = client.collaboration_whitelist().add_domain(domain, direction=WhitelistDirection.INBOUND)
Node
client.collaborationWhitelist.addDomain('test.com', client.collaborationWhitelist.directions.INBOUND, callback);
Node
client.collaborationWhitelist.addDomain('test.com', client.collaborationWhitelist.directions.INBOUND, callback);