Retrieve a legal hold policy assignment.
753465
The ID of the legal hold policy assignment
Returns a legal hold policy object.
An unexpected client error.
curl -X GET https://api.box.com/2.0/legal_hold_policy_assignments/753465 \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
BoxLegalHoldPolicyAssignment assignment = await client.LegalHoldPoliciesManager
.GetAssignmentAsync(assignmentId: "22222");
BoxLegalHoldAssignment assignment = new BoxLegalHoldAssignment(api, id);
BoxLegalHoldAssignment.Info info = assignment.getInfo("assigned_by");
assignment_id = '98765'
assignment = client.legal_hold_policy_assignment(assignment_id).get()
print('Policy {0} is assigned to {1} {2}'.format(
assignment.legal_hold_policy.id,
assignment.assigned_to.type,
assignment.assigned_to.id,
))
client.legalHoldPolicies.getAssignment('22222')
.then(assignment => {
/* assignment -> {
type: 'legal_hold_policy_assignment',
id: '22222',
legal_hold_policy:
{ type: 'legal_hold_policy',
id: '11111',
policy_name: 'IRS Audit' },
assigned_to: { type: 'user', id: '33333' },
assigned_by:
{ type: 'user',
id: '11111',
name: 'Example User',
login: 'user@example.com' },
assigned_at: '2016-05-18T10:32:19-07:00',
deleted_at: null }
*/
});
client.legalHolds.getPolicyAssignment(assignmentId: "22222", fields: ["assigned_at"]) { (result: Result<LegalHoldPolicyAssignment, BoxSDKError>) in
guard case let .success(assignment) = result else {
print("Error getting policy assignment info")
return
}
print("Legal hold policy assignment \(assignmnent.id) was created at \(assignment.assignedAt)")
}