Retrieves information about the legal hold policies assigned to a file version.
2348213
The ID of the file version legal hold
Returns the legal hold policy assignments for the file version.
An unexpected client error.
curl -X GET https://api.box.com/2.0/file_version_legal_holds/2348213 \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
BoxFileVersionLegalHold hold = await client.LegalHoldPoliciesManager
.GetFileVersionLegalHoldAsync("55555");
BoxFileVersionLegalHold hold = new BoxFileVersionLegalHold(api, id);
hold.getInfo("file");
file_version_legal_hold_id = '55555'
legal_hold = client.legal_hold(file_version_legal_hold_id).get()
print('Version {0} of file {1} is held by {2} assignment(s)'.format(
legal_hold.file_version.id,
legal_hold.file.id,
len(legal_hold.legal_hold_policy_assignments),
))
client.legalHoldPolicies.getFileVersionLegalHold('55555')
.then(fileVersionHold => {
/* fileVersionHold -> {
type: 'legal_hold',
id: '55555',
file_version: { type: 'file_version', id: '123456789' },
file: { type: 'file', id: '66666', etag: '1' },
legal_hold_policy_assignments:
[ { type: 'legal_hold_policy_assignment', id: '22222' },
{ type: 'legal_hold_policy_assignment', id: '33333' } ],
deleted_at: null }
*/
});
client.legalHolds.getFileVersionPolicy(legalHoldId: "22222") { (result: Result<FileVersionLegalHold, BoxSDKError>) in
guard case let .success(legalHold) = result else {
print("Error getting file version legal hold")
return
}
print("File version legal hold ID is \(legalHold.id)")
}