Manage Applications

    List cascade policies

    get
    https://api.box.com/2.0
    /metadata_cascade_policies

    Retrieve a collection of metadata cascade policies within a given folder for the current enterprise.

    Request

    application/json

    Query Parameters

    stringin queryrequired
    31232

    Specifies which folder to return policies for.

    stringin queryoptional
    JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii

    The position marker at which to begin the response.

    This requires usemarker to be set to true.

    integer / int64in queryoptional
    10000

    The offset of the item at which to begin the response.

    stringin queryoptional
    31232

    The ID of the enterprise ID for which to find metadata cascade policies. If not specified, it defaults to the current enterprise.

    Response

    Returns a list of metadata cascade policies

    You can now try out some of our APIs live, right here in the documentation.
    Log In

    Request Example

    cURL
    curl -X GET https://api.box.com/2.0/metadata_cascade_policies?folder_id=31232 \
         -H "Authorization: Bearer <ACCESS_TOKEN>"
    .NET
    BoxCollectionMarkerBased<BoxMetadataCascadePolicy> metadataCascadePolicies = await client.MetadataCascadePolicyManager.GetAllMetadataCascadePoliciesAsync("12345");
    Java
    String folderID = "2222";
    BoxFolder folder = new BoxFolder(api, folderID);
    Iterable<BoxMetadataCascadePolicy.Info> metadataCascadePolicies = folder.getMetadataCascadePolicies();
    for (BoxMetadataCascadePolicy.Info policyInfo : metadataCascadePolicies) {
        // take action on policy here
    }
    Python
    cascade_policies = client.folder(folder_id='22222').get_metadata_cascade_policies()
    for policy in cascade_policies:
        print('Metadata template {1} is cascaded'.format(policy.templateKey))
    Node
    var folderID = '22222';
    client.metadata.getCascadePolicies(folderID)
    	.then(cascadePolicies => {
    		/* cascadePolicies -> {
    			limit: 100,
    			entries: [
    				{
    					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'
    				}
    			],
    			next_marker: null,
    			prev_marker: null
    		}
    		*/
    	});

    Response Example

    {
      "limit": 1000,
      "next_marker": 3000,
      "prev_marker": 1000,
      "entries": [
        {
          "id": "6fd4ff89-8fc1-42cf-8b29-1890dedd26d7",
          "owner_enterprise": {
            "type": "enterprise",
            "id": 690678
          },
          "parent": {
            "type": "folder",
            "id": 690678
          },
          "scope": "global",
          "templateKey": "demo"
        }
      ]
    }