メインコンテンツへスキップ
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のバージョニング戦略について詳しく学ぶ。」

承認

Authorization
string
header
必須

The access token received from the authorization server in the OAuth 2.0 flow.

ヘッダー

box-version
enum<string>
必須

バージョンヘッダー

利用可能なオプション:
2025.0

パスパラメータ

hub_id
string
必須

Hubを表す一意の識別子。

HubのIDを確認するには、ウェブアプリでこのHubにアクセスして、URLからIDをコピーします。たとえば、URLがhttps://*.app.box.com/hubs/123の場合、hub_id123です。

ボディ

application/json

Box Hubの項目を管理するためのリクエストのスキーマ。

operations
Box Hubの項目の操作 · object[]

Box Hubの項目に対して実行する操作のリスト。

レスポンス

すべての操作のステータスを取得します。

Box Hubの項目の管理操作のステータスを表すレスポンスのスキーマ。

operations
Box Hubの項目の操作結果 · object[]
必須

Box Hubの項目に対して実行された操作のリスト。

最終更新日 2026年1月23日