Adds and/or removes Box Hub items from a Box Hub.
Version header.
次の値に固定: 2025.0
12345
Hubを表す一意の識別子。
HubのIDを確認するには、ウェブアプリでこのHubにアクセスして、URLからIDをコピーします。たとえば、URLがhttps://*.app.box.com/hubs/123
の場合、hub_id
は123
です。
List of operations to perform on Box Hub items.
"add"
The action to perform on a Box Hub item.
次の値のいずれか1つ: add
,remove
Reference to an item that can be added to a Box Hub.
すべての操作のステータスを取得します。
Authorization
ヘッダーで指定されているアクセストークンが認識されないか、指定されていない場合に返されます。
Returned if the Box Hub is not found, or the user does not have access to the Box Hub.
予期しないクライアントエラー。
await client.hubItems.manageHubItemsV2025R0(createdHub.id, {
operations: [
{
action: 'add' as HubItemOperationV2025R0ActionField,
item: new FolderReferenceV2025R0({ id: folder.id }),
} satisfies HubItemOperationV2025R0,
],
} satisfies HubItemsManageRequestV2025R0);
client.hub_items.manage_hub_items_v2025_r0(
created_hub.id,
operations=[
HubItemOperationV2025R0(
action=HubItemOperationV2025R0ActionField.ADD,
item=FolderReferenceV2025R0(id=folder.id),
)
],
)
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",
"error": "Item not found",
"item": {
"id": "42037322",
"type": "file"
},
"status": 200
}
]
}