Adds and/or removes Hub items from a Hub.
Version header.
Value is always 2025.0
12345
The unique identifier that represent a hub.
The ID for any hub can be determined
by visiting this hub in the web application
and copying the ID from the URL. For example,
for the URL https://*.app.box.com/hubs/123
the hub_id
is 123
.
List of operations to perform on Hub items.
"add"
The action to perform on a Hub item.
Value is one of add
,remove
Reference to an item that can be added to a Hub.
Retrieves the status of all the operations.
Returned when the access token provided in the Authorization
header
is not recognized or not provided.
Returned if the Hub is not found, or the user does not have access to the Hub.
An unexpected client error.
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))}) });
client.getHubItems().manageHubItemsV2025R0(createdHub.getId(), new HubItemsManageRequestV2025R0.Builder().operations(Arrays.asList(new HubItemOperationV2025R0(HubItemOperationV2025R0ActionField.ADD, new FolderReferenceV2025R0(folder.getId())))).build())
{
"operations": [
{
"action": "add",
"error": "Item not found",
"item": {
"id": "42037322",
"type": "file"
},
"status": 200
}
]
}