Retrieves a list of legal hold policies that belong to an enterprise.
id,type,nameA comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.
Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.
10001000The maximum number of items to return per page.
JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioViiDefines the position marker at which to begin returning results. This is used when paginating using marker-based pagination.
This requires usemarker to be set to true.
Sales PolicyLimits results to policies for which the names start with this search term. This is a case-insensitive prefix.
Returns a list of legal hold policies.
An unexpected client error.
curl -X GET https://api.box.com/2.0/legal_hold_policies \
-H 'Authorization: Bearer <ACCESS_TOKEN>'BoxCollectionMarkerBased<BoxLegalHoldPolicy> policies = await client.LegalHoldPoliciesManager
.GetListLegalHoldPoliciesAsync();Iterable<BoxLegalHoldPolicy.Info> policies = BoxLegalHoldPolicy.getAll(api);
for (BoxLegalHoldPolicy.Info policyInfo : policies) {
// Do something with the legal hold policy.
}policies = client.get_legal_hold_policies()
for policy in policies:
print('Legal Hold Policy "{0}" has ID {1}'.format(policy.name, policy.id))client.legalHoldPolicies.getAll({policy_name: 'Important'})
.then(policies => {
/* policies -> {
entries:
[ { type: 'legal_hold_policy',
id: '11111',
policy_name: 'Important Policy 1' },
{ type: 'legal_hold_policy',
id: '22222',
policy_name: 'Important Policy 2' } ],
limit: 100,
order: [ { by: 'policy_name', direction: 'ASC' } ] }
*/
});client.legalHolds.listForEnterprise(policyName: "policy1") { results in
switch results {
case let .success(iterator):
for i in 1 ... 10 {
iterator.next { result in
switch result {
case let .success(policy):
print("Legal hold policy \(policy.name)")
case let .failure(error):
print(error)
}
}
}
case let .failure(error):
print(error)
}
}