Get retention policy

get
https://api.box.com/2.0
/retention_policies/:retention_policy_id

Retrieves a retention policy.

Request

application/json

Path Parameters

stringin pathrequired
982312

The ID of the retention policy.

Response

application/jsonRetention Policy

Returns the retention policy object.

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/retention_policies/982312 \
     -H "Authorization: Bearer <ACCESS_TOKEN>"
.NET
BoxRetentionPolicy policy = await client.RetentionPoliciesManager.GetRetentionPolicyAsync("11111");
Java
// Get the policy name and status for a given retention policy
BoxRetentionPolicy policy = new BoxRetentionPolicy(api, id);
policy.getInfo("policy_name", "status");
Python
retention_policy = client.retention_policy(policy_id='12345').get()
print('Retention Policy ID is {0} and the name is {1}'.format(retention_policy.id, retention_policy.policy_name))
Node
client.retentionPolicies.get('123456789')
	.then(policy => {
		/* policy -> {
			type: 'retention_policy',
			id: '123456789',
			policy_name: 'Tax Documents',
			policy_type: 'indefinite',
			retention_length: 'indefinite',
			disposition_action: 'remove_retention',
			can_owner_extend_retention: false,
			status: 'active',
			are_owners_notified: true,
			custom_notification_recipients: []
			assignment_counts: { enterprise: 0, folder: 1, metadata_template: 0 },
			created_by: 
			{ type: 'user',
				id: '11111',
				name: 'Example User',
				login: 'user@example.com' },
			created_at: '2015-05-01T11:12:54-07:00',
			modified_at: '2015-06-08T11:11:50-07:00' }
		*/
	});

Response Example

{
  "id": 12345,
  "type": "file_version",
  "policy_name": "Some Policy Name",
  "retention_length": 0,
  "disposition_action": "permanently_delete",
  "policy_type": "finite",
  "status": "active",
  "created_by": {
    "id": 11446498,
    "type": "user",
    "name": "Aaron Levie",
    "login": "ceo@example.com"
  },
  "created_at": "2012-12-12T10:53:43-08:00",
  "modified_at": "2012-12-12T10:53:43-08:00"
}