Returns a list of files under retention for a retention policy assignment.
1233123
The ID of the retention policy assignment.
1000
1000
The maximum number of items to return per page.
JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii
Defines 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
.
Returns a list of files under retention that are associated with the specified retention policy assignment.
Returns an error if retention_policy_assignment_id
is not specified.
An unexpected client error.
curl -i -X GET "https://app.box.com/api/2.0/retention_policy_assignments/3424234/files_under_retention" \
-H "authorization: Bearer <ACCESS_TOKEN>"
await client.retentionPolicyAssignments.getFilesUnderRetentionPolicyAssignment(
retentionPolicyAssignment.id,
);
client.retention_policy_assignments.get_files_under_retention_policy_assignment(
retention_policy_assignment.id
)
await client.RetentionPolicyAssignments.GetFilesUnderRetentionPolicyAssignmentAsync(retentionPolicyAssignmentId: retentionPolicyAssignment.Id);
try await client.retentionPolicyAssignments.getFilesUnderRetentionPolicyAssignment(retentionPolicyAssignmentId: retentionPolicyAssignment.id)
BoxRetentionPolicyAssignment policyAssignment = new BoxRetentionPolicyAssignment(api, id);
Iterable<BoxFile.Info> filesUnderRetention = policyAssignment.getFilesUnderRetention();
for (BoxFile.Info item : filesUnderRetention){
// Do something with the files under retention.
}
retention_policy_assignment = client.retention_policy_assignment(assignment_id='12345').get()
files_under_retention = retention_policy_assignment.get_files_under_retention()
for file in files_under_retention:
print(f'The file with ID {file.object_id} and name {file.name} is under retention for a retention policy assignment with ID {retention_policy_assignment.object_id}')
BoxCollectionMarkerBased<BoxFile> filesUnderRetentionForAssignment = await client.RetentionPoliciesManager
.GetFilesUnderRetentionForAssignmentAsync("55555");
client.retentionPolicies
.getFilesUnderRetentionForAssignment('12345')
.then((files) => {
/* files -> {
entries:
[ {
id: 12345,
etag: 1,
type: 'file',
sequence_id: 3,
name: 'Contract.pdf',
sha1: '85136C79CBF9FE36BB9D05D0639C70C265C18D37',
file_version: {
id: 123456,
type: 'file_version',
sha1: '134b65991ed521fcfe4724b7d814ab8ded5185dc',
},
applied_at: '2012-12-12T10:53:43-08:00' } ],
limit: 1000,
marker: 'some marker' }
*/
});
let iterator = client.retentionPolicy.listFilesUnderRetentionForAssignment(retentionPolicyAssignmentId: "123456")
iterator.next { results in
switch results {
case let .success(page):
for file in page.entries {
print("File \(file.name ?? "")")
}
case let .failure(error):
print(error)
}
}
{
"entries": [
{
"id": "12345",
"etag": "1",
"type": "file",
"sequence_id": "3",
"name": "Contract.pdf",
"sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
"file_version": {
"id": "12345",
"type": "file_version",
"sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
}
}
],
"limit": 1000,
"next_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii",
"prev_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVih"
}