Documentation Index
Fetch the complete documentation index at: https://developer.box.com/llms.txt
Use this file to discover all available pages before exploring further.
メタデータをファイルまたはフォルダに適用したら、多くの場合は、後日メタデータの更新が必要になります。
メタデータインスタンスを更新するには、元のデータに一連の操作を適用します。これらの操作はアトミックに実行されるため、変更はすべて適用されるか、まったく適用されないかのいずれかになります。
この場合、顧客のnameをBox, IncからBoxに変更するとします。適用できる操作は2つあり、まず、変更前に名前の値がまだBox, Incであることを確認し、次に変更を行います。
curl -X PUT https://api.box.com/2.0/files/12345/metadata/enterprise/customerInfo \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json-patch+json" \
-d '[
{
"op": "test",
"path": "/name",
"value": "Box, Inc"
},
{
"op": "replace",
"path": "/name",
"value": "Box"
}
]'
このAPIにより、更新されたメタデータインスタンスが返されます。
{
"name": "Box",
"industry": "Technology",
"tav": 1000000,
"$id": "01234500-12f1-1234-aa12-b1d234cb567e",
"$parent": "folder_12345,",
"$scope": "enterprise_34567",
"$template": "customerInfo",
"$type": "customerInfo-6bcba49f-ca6d-4d2a-a758-57fe6edf44d0",
"$typeVersion": 2,
"$version": 1,
"$canEdit": true
}