Box Developer Documentation

Get a metadata cascade policy

Get a metadata cascade policy

Information for a metadata cascade policy can be retrieved by calling the GET /metadata_cascade_policies/:id API endpoint with the id of the policy.

cURL
curl -i -X GET "https://api.box.com/2.0/metadata_cascade_policies/324324" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
TypeScript Gen
await client.metadataCascadePolicies.getMetadataCascadePolicyById(
  cascadePolicyId,
);
Python Gen
client.metadata_cascade_policies.get_metadata_cascade_policy_by_id(cascade_policy_id)
.NET Gen
await client.MetadataCascadePolicies.GetMetadataCascadePolicyByIdAsync(metadataCascadePolicyId: cascadePolicyId);
Java
String cascadePolicyID = "1234";
BoxMetadataCascadePolicy metadataCascadePolicy = new BoxMetadataCascadePolicy(api, cascadePolicyID);
BoxMetadataCascadePolicy.Info metadataCascadePolicyInfo = metadataCascadePolicy.getInfo();
Python
cascade_policy = client.metadata_cascade_policy('84113349-794d-445c-b93c-d8481b223434').get()
print(f'Cascade policy applies to a template owned by enterprise {cascade_policy.owner_enterprise.id}')
.NET
BoxMetadataCascadePolicy retrievedCascadePolicy = await client.MetadataCascadePolicyManager
    .GetCascadePolicyAsync("12345", IEnumerable<string> fields = null);
Node
var policyID = '84113349-794d-445c-b93c-d8481b223434';
client.metadata.getCascadePolicy(policyID)
	.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 id of the policy, list all policies for the folder.