メインコンテンツへスキップ
既存のBox Hubのコピーを作成するには、コピー元のHub IDと、新しいタイトルおよび説明 (省略可) を指定して、POST /2.0/hubs/{hub_id}/copyエンドポイントを呼び出します。コピー元のHubは変更されません。
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をコピー

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."
     }'
HUB_IDをコピー元のHub IDに置き換えます。リクエスト本文のフィールドは省略可能です。titleパラメータを省略した場合、APIはデフォルト値を使用します。成功したレスポンスでは、新しいHubオブジェクトが返されます。

リクエスト本文のフィールド

フィールド必須説明
titlestringいいえ新しいHubのタイトル。最大文字数は50文字です。
descriptionstringいいえ新しいHubの説明。