Box Hubs endpoints require the
box-version: 2025.0 header. If you omit this header, the API returns a 400 error with the message Missing required box-version header. Supported API versions: [2025.0]. For more information, see Box API versioning strategy.Hubをコピー
box hubs:copy 12345 --title "HR Hub (Copy)" --description "Copy of the HR hub for a new region."
curl -i -X POST "https://api.box.com/2.0/hubs/HUB_ID/copy" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "box-version: 2025.0" \
-H "Content-Type: application/json" \
-d '{
"title": "HR Hub (Copy)",
"description": "Copy of the HR hub for a new region."
}'
await client.hubs.copyHubV2025R0(createdHub.id, {
title: copiedHubTitle,
description: copiedHubDescription,
} satisfies HubCopyRequestV2025R0);
client.hubs.copy_hub_v2025_r0(created_hub.id, title=copied_hub_title, description=copied_hub_description)
await client.Hubs.CopyHubV2025R0Async(hubId: createdHub.Id, requestBody: new HubCopyRequestV2025R0() { Title = copiedHubTitle, Description = copiedHubDescription });
try await client.hubs.copyHubV2025R0(hubId: createdHub.id, requestBody: HubCopyRequestV2025R0(title: copiedHubTitle, description: copiedHubDescription))
client.getHubs().copyHubV2025R0(createdHub.getId(), new HubCopyRequestV2025R0.Builder().title(copiedHubTitle).description(copiedHubDescription).build());
HUB_IDをコピー元のHub IDに置き換えます。リクエスト本文のフィールドは省略可能です。titleパラメータを省略した場合、APIはデフォルト値を使用します。成功したレスポンスでは、新しいオブジェクトが返されます。
リクエスト本文のフィールド
| フィールド | 型 | 必須 | 説明 |
|---|---|---|---|
title | string | いいえ | 新しいHubのタイトル。最大文字数は50文字です。 |
description | string | いいえ | 新しいHubの説明。 |
