Box Developer Documentation
 
    Latest version

    Force-apply metadata cascade policy to folder

    post
    https://api.box.com/2.0
    /metadata_cascade_policies/:metadata_cascade_policy_id/apply

    This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.

    Force the metadata on a folder with a metadata cascade policy to be applied to all of its children. This can be used after creating a new cascade policy to enforce the metadata to be cascaded down to all existing files within that folder.

    Request

    bearer [ACCESS_TOKEN]
    application/json

    Path Parameters

    stringin pathrequired
    6fd4ff89-8fc1-42cf-8b29-1890dedd26d7

    The ID of the cascade policy to force-apply.

    Request Body

    stringin bodyrequired
    "none"

    Describes the desired behavior when dealing with the conflict where a metadata template already has an instance applied to a child.

    • none will preserve the existing value on the file
    • overwrite will force-apply the templates values over any existing values.

    Value is one of none,overwrite

    Response

    none

    Returns an empty response when the API call was successful. The metadata cascade operation will be performed asynchronously.

    The API call will return directly, before the cascade operation is complete. There is currently no API to check for the status of this operation.

    application/jsonClient error

    Returns an error when the policy can not be found or the user does not have access to the folder.

    • instance_not_found - The policy could not be found
    • not_found - The folder could not be found or the user does not have access to the folder.
    application/jsonClient error

    An unexpected client error.

    post
    Force-apply metadata cascade policy to folder
    You can now try out some of our APIs live, right here in the documentation.
    Log in

    Request Example

    cURL
    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"
         }'