Get retention policy assignment

get
https://api.box.com/2.0
/retention_policy_assignments/:retention_policy_assignment_id/

Retrieves a retention policy assignment

Request

Bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
1233123

The ID of the retention policy assignment.

Response

Returns the retention policy assignment object.

application/jsonClient error

An unexpected client error.

get
Get retention policy assignment
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -i -X GET "https://api.box.com/2.0/retention_policy_assignments/1233123" \
     -H "Authorization: Bearer <ACCESS_TOKEN>"
.NET
BoxRetentionPolicyAssignment assignment = await client.RetentionPoliciesManager
    .GetRetentionPolicyAssignmentAsync("33333");
Java
BoxRetentionPolicyAssignment assignment = new BoxRetentionPolicyAssignment(api, id);
BoxRetentionPolicyAssignment.Info assignmentInfo = assignment.getInfo("assigned_to");
Python
assignment = client.retention_policy_assignment('12345').get()
print('Assignment id is {0} and it is assigned by {1}'.format(assignment.id, assignment.assigned_by.name))
Node
client.retentionPolicies.getAssignment('12345')
	.then(assignment => {
		/* assignment -> {
			type: 'retention_policy_assignment',
			id: '12345',
			retention_policy: 
			{ type: 'retention_policy',
				id: '11111',
				policy_name: 'Tax Documents' },
			assigned_to: { type: 'folder', id: '22222' },
			assigned_by: 
			{ type: 'user',
				id: '33333',
				name: 'Example User',
				login: 'user@example.com' },
			assigned_at: '2015-07-20T14:28:09-07:00' }
		*/
	});

Response Example

{
  "id": 11446498,
  "type": "retention_policy_assignment",
  "assigned_at": "2012-12-12T10:53:43-08:00",
  "assigned_by": {
    "id": 11446498,
    "type": "user",
    "login": "ceo@example.com",
    "name": "Aaron Levie"
  },
  "assigned_to": {
    "id": 11446498,
    "type": "file"
  },
  "retention_policy": {
    "id": 12345,
    "type": "file_version",
    "disposition_action": "permanently_delete",
    "policy_name": "Some Policy Name",
    "retention_length": 365
  }
}