cURL
curl -i -X PUT "https://api.box.com/2.0/archives/12345" \
-H "box-version: 2025.0" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"name": "Some Archive Name",
"description": "Some Archive Description"
}'client.archives.update_archive_by_id_v2025_r0(
archive.id, name=new_archive_name, description=new_archive_description
)await client.archives.updateArchiveByIdV2025R0(archive.id, {
requestBody: {
name: newArchiveName,
description: newArchiveDescription,
} satisfies UpdateArchiveByIdV2025R0RequestBody,
} satisfies UpdateArchiveByIdV2025R0OptionalsInput);try await client.archives.updateArchiveByIdV2025R0(archiveId: archive.id, requestBody: UpdateArchiveByIdV2025R0RequestBody(name: newArchiveName, description: newArchiveDescription))client.getArchives().updateArchiveByIdV2025R0(archive.getId(), new UpdateArchiveByIdV2025R0RequestBody.Builder().name(newArchiveName).description(newArchiveDescription).build())await client.Archives.UpdateArchiveByIdV2025R0Async(archiveId: archive.Id, requestBody: new UpdateArchiveByIdV2025R0RequestBody() { Name = newArchiveName, Description = newArchiveDescription });{
"id": "12345",
"type": "archive",
"name": "Archive",
"size": 123456789,
"description": "This is an archive for important documents.",
"owned_by": {
"id": "12345",
"type": "user"
}
}{
"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"
}{
"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"
}{
"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"
}Archives
アーカイブを更新
アーカイブを更新します。
アーカイブのAPIの詳細については、Archive APIガイドを参照してください。
PUT
/
archives
/
{archive_id}
cURL
curl -i -X PUT "https://api.box.com/2.0/archives/12345" \
-H "box-version: 2025.0" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"name": "Some Archive Name",
"description": "Some Archive Description"
}'client.archives.update_archive_by_id_v2025_r0(
archive.id, name=new_archive_name, description=new_archive_description
)await client.archives.updateArchiveByIdV2025R0(archive.id, {
requestBody: {
name: newArchiveName,
description: newArchiveDescription,
} satisfies UpdateArchiveByIdV2025R0RequestBody,
} satisfies UpdateArchiveByIdV2025R0OptionalsInput);try await client.archives.updateArchiveByIdV2025R0(archiveId: archive.id, requestBody: UpdateArchiveByIdV2025R0RequestBody(name: newArchiveName, description: newArchiveDescription))client.getArchives().updateArchiveByIdV2025R0(archive.getId(), new UpdateArchiveByIdV2025R0RequestBody.Builder().name(newArchiveName).description(newArchiveDescription).build())await client.Archives.UpdateArchiveByIdV2025R0Async(archiveId: archive.Id, requestBody: new UpdateArchiveByIdV2025R0RequestBody() { Name = newArchiveName, Description = newArchiveDescription });{
"id": "12345",
"type": "archive",
"name": "Archive",
"size": 123456789,
"description": "This is an archive for important documents.",
"owned_by": {
"id": "12345",
"type": "user"
}
}{
"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"
}{
"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"
}{
"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のバージョニング戦略について詳しく学ぶ。」
承認
The access token received from the authorization server in the OAuth 2.0 flow.
ヘッダー
Version header.
利用可能なオプション:
2025.0 パスパラメータ
アーカイブのID。
ボディ
application/json
レスポンス
更新されたアーカイブオブジェクトを返します。
アーカイブとは、冗長なコンテンツ、古くなったコンテンツ、または重要でないコンテンツの保存専用のフォルダです。アーカイブ内のコンテンツには、その所有者とコラボレータはアクセスできません。この機能を使用するには、Boxアプリケーションに対してGCMスコープをリクエストする必要があります。
アーカイブを表す一意の識別子。
例:
"12345"
値は常にarchiveになります。
利用可能なオプション:
archive 例:
"archive"
アーカイブの名前。
アーカイブ名には、印刷不可能なASCII文字、スラッシュ、バックスラッシュ (/、\) を含む名前、末尾にスペースを含む名前、.および..という名前は使用できないという制限が適用されます。
Required string length:
1 - 100例:
"Archive"
アーカイブのサイズ (バイト単位)。
例:
123456789
アーカイブの説明。
Maximum string length:
255例:
"This is an archive for important documents."
アーカイブを所有するユーザーについて説明している、アーカイブAPIレスポンスの部分。
Show child attributes
Show child attributes
例:
{ "id": "12345", "type": "user" }
最終更新日 2026年1月23日
このページは役に立ちましたか?
⌘I
