Join the first BoxWorks Hackathon for Good - customers, partners, and the developer community are welcome to participate in the 48 hour Hack to benefit The Nature Conservancy.

Learn more and register!

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 -i -X GET "" \
     -H "Authorization: Bearer <ACCESS_TOKEN>"
BoxLegalHoldPolicy policy = await client.LegalHoldPoliciesManager.GetLegalHoldPolicyAsync("11111");
BoxLegalHoldPolicy policy = new BoxLegalHoldPolicy(api, id);
BoxLegalHoldPolicy.Info policyInfo = policy.getInfo();
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}')
	.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 },
			{ type: 'user',
				id: '22222',
				name: 'Example User',
				login: '' },
			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' }
client.legalHolds.get(policyId: "22222", fields: ["name", "created_at"]) { (result: Result<LegalHoldPolicy, BoxSDKError>) in
    guard case let .success(policy) = result else {
        print("Error getting policy information")
    print("Legal hold policy \( was created at \(policy.createdAt)")

Required Scopes

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