Box Developer Documentation

List All Legal Hold Policies

Guides Legal Holds List All Legal Hold Policies
Edit this page

List All Legal Hold Policies

To list all Legal Hold Policies that have been created in an enterprise, call the GET /legal_hold_policies API endpoint.

cURL
curl -i -X GET "https://api.box.com/2.0/legal_hold_policies" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
Node/TypeScript v10
await client.legalHoldPolicies.getLegalHoldPolicies();
Python v10
client.legal_hold_policies.get_legal_hold_policies()
.NET v10
await client.LegalHoldPolicies.GetLegalHoldPoliciesAsync();
Swift v10
try await client.legalHoldPolicies.getLegalHoldPolicies()
Java v10
client.getLegalHoldPolicies().getLegalHoldPolicies()
Java v4
Iterable<BoxLegalHoldPolicy.Info> policies = BoxLegalHoldPolicy.getAll(api);
for (BoxLegalHoldPolicy.Info policyInfo : policies) {
    // Do something with the legal hold policy.
}
Python v3
policies = client.get_legal_hold_policies()
for policy in policies:
    print(f'Legal Hold Policy "{policy.name}" has ID {policy.id}')
.NET v5
BoxCollectionMarkerBased<BoxLegalHoldPolicy> policies = await client.LegalHoldPoliciesManager
    .GetListLegalHoldPoliciesAsync();
Node v3
client.legalHoldPolicies.getAll({policy_name: 'Important'})
	.then(policies => {
		/* policies -> {
			entries: 
			[ { type: 'legal_hold_policy',
				id: '11111',
				policy_name: 'Important Policy 1' },
				{ type: 'legal_hold_policy',
				id: '22222',
				policy_name: 'Important Policy 2' } ],
			limit: 100,
			order: [ { by: 'policy_name', direction: 'ASC' } ] }
		*/
	});

Required Scopes

Before using any of the Legal Hold APIs, an application must have the right scopes enabled. See Required Scopes for more details.