Force-apply metadata to all items in a folder
Force-apply metadata to all items in a folder
When a metadata cascade policy already exists on a folder, the metadata instance
can be force-applied to all items in a folder by calling the
POST /metadata_cascade_policies/:id/apply
API endpoint with the
id
of the metadata cascade policy.
curl -i -X POST "https://api.box.com/2.0/metadata_cascade_policies/21312/apply" \
-H "authorization: Bearer <ACCESS_TOKEN>" \
-H "content-type: application/json" \
-d '{
"conflict_resolution": "overwrite"
}'
Conflict resolution
An additional conflict_resolution
parameter can be passed to this API to
define how to deal with any existing instances of the template on any of the
items in the folder.
By default, without setting any value for conflict_resolution
this API will
preserve the existing value on any items. When the value is set to overwrite
,
it will force-apply the value of the template attached to the cascade policy
over any existing value.