Box Developer Documentation

A beta version of the new Box developer documentation site is launching soon! Updated Developer Guides, modern API Reference, and AI-powered search are on the way to help you build with Box faster. Stay tuned for more updates.

Get Legal Hold Policy

Guides Legal Holds Get Legal Hold Policy
Edit this page

Get Legal Hold Policy

To get the information for a specific Legal Hold policy that has been created in an enterprise, call the GET /legal_hold_policies/:id API endpoint with the id of the policy.

cURL
curl -i -X GET "https://api.box.com/2.0/legal_hold_policies/324432" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
Node/TypeScript v10
await client.legalHoldPolicies.getLegalHoldPolicyById(legalHoldPolicyId);
Python v10
client.legal_hold_policies.get_legal_hold_policy_by_id(legal_hold_policy_id)
.NET v10
await client.LegalHoldPolicies.GetLegalHoldPolicyByIdAsync(legalHoldPolicyId: legalHoldPolicyId);
Swift v10
try await client.legalHoldPolicies.getLegalHoldPolicyById(legalHoldPolicyId: legalHoldPolicyId)
Java v10
client.getLegalHoldPolicies().getLegalHoldPolicyById(legalHoldPolicyId)
Java v5
BoxLegalHoldPolicy policy = new BoxLegalHoldPolicy(api, id);
BoxLegalHoldPolicy.Info policyInfo = policy.getInfo();
Python v4
legal_hold_policy = client.legal_hold_policy(policy_id='12345').get()
print(f'The "{legal_hold_policy.policy_name}" policy is {legal_hold_policy.status}')
.NET v6
BoxLegalHoldPolicy policy = await client.LegalHoldPoliciesManager.GetLegalHoldPolicyAsync("11111");
Node v4
client.legalHoldPolicies.get('11111')
	.then(policy => {
		/* policy -> {
			type: 'legal_hold_policy',
			id: '11111',
			policy_name: 'IRS Audit',
			description: '',
			status: 'active',
			assignment_counts: { user: 1, folder: 0, file: 0, file_version: 0 },
			created_by: 
			{ type: 'user',
				id: '22222',
				name: 'Example User',
				login: 'user@example.com' },
			created_at: '2016-05-18T10:28:45-07:00',
			modified_at: '2016-05-18T11:25:59-07:00',
			deleted_at: null,
			filter_started_at: '2016-05-17T01:00:00-07:00',
			filter_ended_at: '2016-05-21T01:00:00-07:00' }
		*/
	});

Required Scopes

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