cURL
curl -i -X POST "https://api.box.com/2.0/hubs/12345/manage_items" \
-H "box-version: 2025.0" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"operations": [
{
"action": "add",
"item": {
"type": "folder",
"id": "123456789"
}
}
]
}'client.hub_items.manage_hub_items_v2025_r0(
created_hub.id,
operations=[
HubItemOperationV2025R0(
action=HubItemOperationV2025R0ActionField.ADD,
item=FolderReferenceV2025R0(id=folder.id),
)
],
)await client.hubItems.manageHubItemsV2025R0(createdHub.id, {
operations: [
{
action: 'add' as HubItemOperationV2025R0ActionField,
item: new FolderReferenceV2025R0({ id: folder.id }),
} satisfies HubItemOperationV2025R0,
],
} satisfies HubItemsManageRequestV2025R0);client.getHubItems().manageHubItemsV2025R0(createdHub.getId(), new HubItemsManageRequestV2025R0.Builder().operations(Arrays.asList(new HubItemOperationV2025R0(HubItemOperationV2025R0ActionField.ADD, new FolderReferenceV2025R0(folder.getId())))).build())await client.HubItems.ManageHubItemsV2025R0Async(hubId: createdHub.Id, requestBody: new HubItemsManageRequestV2025R0() { Operations = Array.AsReadOnly(new [] {new HubItemOperationV2025R0(action: HubItemOperationV2025R0ActionField.Add, item: new FolderReferenceV2025R0(id: folder.Id))}) });{
"operations": [
{
"action": "add",
"item": {
"type": "file",
"id": "42037322"
},
"parent_id": "721d97d7-ac8a-4e5e-adb6-ef11af4e6d9e",
"status": 200,
"error": "Item not found"
}
]
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}エンドポイント
Box Hubの項目を管理
Box HubからBox Hubの項目を追加または削除します。
POST
/
hubs
/
{hub_id}
/
manage_items
cURL
curl -i -X POST "https://api.box.com/2.0/hubs/12345/manage_items" \
-H "box-version: 2025.0" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"operations": [
{
"action": "add",
"item": {
"type": "folder",
"id": "123456789"
}
}
]
}'client.hub_items.manage_hub_items_v2025_r0(
created_hub.id,
operations=[
HubItemOperationV2025R0(
action=HubItemOperationV2025R0ActionField.ADD,
item=FolderReferenceV2025R0(id=folder.id),
)
],
)await client.hubItems.manageHubItemsV2025R0(createdHub.id, {
operations: [
{
action: 'add' as HubItemOperationV2025R0ActionField,
item: new FolderReferenceV2025R0({ id: folder.id }),
} satisfies HubItemOperationV2025R0,
],
} satisfies HubItemsManageRequestV2025R0);client.getHubItems().manageHubItemsV2025R0(createdHub.getId(), new HubItemsManageRequestV2025R0.Builder().operations(Arrays.asList(new HubItemOperationV2025R0(HubItemOperationV2025R0ActionField.ADD, new FolderReferenceV2025R0(folder.getId())))).build())await client.HubItems.ManageHubItemsV2025R0Async(hubId: createdHub.Id, requestBody: new HubItemsManageRequestV2025R0() { Operations = Array.AsReadOnly(new [] {new HubItemOperationV2025R0(action: HubItemOperationV2025R0ActionField.Add, item: new FolderReferenceV2025R0(id: folder.Id))}) });{
"operations": [
{
"action": "add",
"item": {
"type": "file",
"id": "42037322"
},
"parent_id": "721d97d7-ac8a-4e5e-adb6-ef11af4e6d9e",
"status": 200,
"error": "Item not found"
}
]
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}{
"type": "error",
"status": 400,
"code": "item_name_invalid",
"message": "Method Not Allowed",
"context_info": {
"message": "Something went wrong"
},
"help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
"request_id": "abcdef123456"
}「Box SDKのバージョニング戦略について詳しく学ぶ。」
承認
The access token received from the authorization server in the OAuth 2.0 flow.
ヘッダー
バージョンヘッダー
利用可能なオプション:
2025.0 パスパラメータ
Hubを表す一意の識別子。
HubのIDを確認するには、ウェブアプリでこのHubにアクセスして、URLからIDをコピーします。たとえば、URLがhttps://*.app.box.com/hubs/123の場合、hub_idは123です。
ボディ
application/json
Box Hubの項目を管理するためのリクエストのスキーマ。
Box Hubの項目に対して実行する操作のリスト。
Show child attributes
Show child attributes
レスポンス
すべての操作のステータスを取得します。
Box Hubの項目の管理操作のステータスを表すレスポンスのスキーマ。
Box Hubの項目に対して実行された操作のリスト。
Show child attributes
Show child attributes
最終更新日 2026年1月23日
このページは役に立ちましたか?
⌘I
