v1

latestOpenAPI 3.0.2Apache-2.02026-07-142963051.0 MB
Metadata cascade policies

Create metadata cascade policy

Creates a new metadata cascade policy that applies a given metadata template to a given folder and automatically cascades it down to any files within that folder.

In order for the policy to be applied a metadata instance must first be applied to the folder the policy is to be applied to.

post/metadata_cascade_policies

Request body

folder_idstring required

The ID of the folder to apply the policy to. This folder will need to already have an instance of the targeted metadata template applied to it.

scope'global' | 'enterprise' required

The scope of the targeted metadata template. This template will need to already have an instance applied to the targeted folder.

templateKeystring required

The key of the targeted metadata template. This template will need to already have an instance applied to the targeted folder.

In many cases the template key is automatically derived of its display name, for example Contract Template would become contractTemplate. In some cases the creator of the template will have provided its own template key.

Please list the templates for an enterprise, or get all instances on a file or folder to inspect a template's key.

Example request

{
  "folder_id": "1234567",
  "scope": "enterprise",
  "templateKey": "productInfo"
}

Response

Returns a new of metadata cascade policy.

idstring required

The ID of the metadata cascade policy object.

type'metadata_cascade_policy' required

The value will always be metadata_cascade_policy.

scopestring

The scope of the metadata cascade policy can either be global or enterprise_*. The global scope is used for policies that are available to any Box enterprise. The enterprise_* scope represents policies that have been created within a specific enterprise, where * will be the ID of that enterprise.

templateKeystring

The key of the template that is cascaded down to the folder's children.

In many cases the template key is automatically derived of its display name, for example Contract Template would become contractTemplate. In some cases the creator of the template will have provided its own template key.

Please list the templates for an enterprise, or get all instances on a file or folder to inspect a template's key.

Example response

{
  "id": "6fd4ff89-8fc1-42cf-8b29-1890dedd26d7",
  "type": "metadata_cascade_policy",
  "owner_enterprise": {
    "type": "enterprise",
    "id": "690678"
  },
  "parent": {
    "type": "folder",
    "id": "1234567"
  },
  "scope": "enterprise_123456",
  "templateKey": "productInfo"
}