Create a metadata cascade policy

Create a metadata cascade policy

When a metadata template has been applied to a folder, a metadata cascade policy can be created by calling the POST /metadata_cascade_policies API endpoint with the folder_id of the folder to apply the policy to, and the scope and templateKey of metadata template to.

curl -i -X POST "" \
     -H "authorization: Bearer <ACCESS_TOKEN>" \
     -H "content-type: application/json" \
     -d '{
       "folder_id": "12321",
       "scope": "enterprise_27335",
       "templateKey": "productInfo"
TypeScript Gen
await client.metadataCascadePolicies.createMetadataCascadePolicy({
  scope: 'enterprise' as CreateMetadataCascadePolicyRequestBodyScopeField,
  templateKey: templateKey,
} satisfies CreateMetadataCascadePolicyRequestBody);
Python Gen
client.metadata_cascade_policies.create_metadata_cascade_policy(, CreateMetadataCascadePolicyScope.ENTERPRISE.value, template_key
.NET Gen (Beta)
await client.MetadataCascadePolicies.CreateMetadataCascadePolicyAsync(requestBody: new CreateMetadataCascadePolicyRequestBody(folderId: folder.Id, scope: CreateMetadataCascadePolicyRequestBodyScopeField.Enterprise, templateKey: templateKey));
folder = client.folder(folder_id='22222')
metadata_template = client.metadata_template('enterprise', 'securityClassiciation')

cascade_policy = folder.cascade_metadata(metadata_template)
print(f'Folder {} has a metadata cascade policy for {cascade_policy.scope} template "{cascade_policy.templateKey}"')
BoxMetadataCascadePolicy metadataCascadePolicy = await client.MetadataCascadePolicyManager
    .CreateCascadePolicyAsync("22222", "enterprise_11111", "templateKey");
var folderID = '22222';
client.metadata.createCascadePolicy('enterprise', 'testTemplate', folderID)
	.then(cascadePolicy => {
		/* cascadePolicy -> {
			id: '84113349-794d-445c-b93c-d8481b223434',
			type: 'metadata_cascade_policy',
			owner_enterprise: {
				type: 'enterprise',
				id: '11111'
			parent: {
				type: 'folder',
				id: '22222'
			scope: 'enterprise_11111',
			templateKey: 'testTemplate'

To get the scope and templateKey for a template, either list all metadata templates, or list all instances on an file.

A cascade policy can only be created if a metadata instance has already been applied to the folder with the given scope and templateKey.