Retrieves all file version retentions for the given enterprise.
Note: File retention API is now deprecated. To get information about files and file versions under retention, see files under retention or file versions under retention endpoints.
permanently_deleteFilters results by the retention policy with this disposition action.
Value is one of permanently_delete,remove_retention
2012-12-19T10:34:23-08:00Filters results by files that will have their disposition come into effect after this date.
2012-12-12T10:53:43-08:00Filters results by files that will have their disposition come into effect before this date.
43123123Filters results by files with this ID.
1Filters results by file versions with this ID.
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.
982312Filters results by the retention policy with this ID.
Returns a list of all file version retentions for the enterprise.
An unexpected client error.
curl -i -X GET "https://api.box.com/2.0/file_version_retentions" \
-H "authorization: Bearer <ACCESS_TOKEN>"await client.fileVersionRetentions.getFileVersionRetentions();client.file_version_retentions.get_file_version_retentions()await client.FileVersionRetentions.GetFileVersionRetentionsAsync();try await client.fileVersionRetentions.getFileVersionRetentions()client.getFileVersionRetentions().getFileVersionRetentions()BoxFileVersionRetention.QueryFilter filter = new BoxFileVersionRetention.QueryFilter()
.addFileID("0")
.addFileVersionID("1")
.addPolicyID("2")
.addDispositionAction(BoxRetentionPolicy.ACTION_PERMANENTLY_DELETE)
.addDispositionBefore(BoxDateFormat.parse("2016-09-15T13:15:35+0000"))
.addDispositionAfter(BoxDateFormat.parse("2014-09-15T13:15:35+0000"));
Iterable<BoxFileVersionRetention.Info> retentions
= BoxFileVersionRetention.getRetentions(api, filter, "file", "applied_at");
for (BoxFileVersionRetention.Info retentionInfo : retentions) {
// Do something with the file version retention.
}retentions = client.get_file_version_retentions()
for retention in retentions:
print(f'The file version retention ID is {retention.id} and the data time applied at is {retention.applied_at}')BoxCollectionMarkerBased<BoxFileVersionRetention> retentions = await client.RetentionPoliciesManager
.GetFileVersionRetentionsAsync();// Get only the retention records set to delete items before a certain date
var options = {
disposition_action:
client.retentionPolicies.dispositionActions.PERMANENTLY_DELETE,
disposition_before: '2038-01-01T12:34:56-08:00',
};
client.retentionPolicies
.getAllFileVersionRetentions(options)
.then((retentions) => {
/* retentions -> {
entries:
[ { type: 'file_version_retention', id: '112725' },
{ type: 'file_version_retention', id: '112729' },
{ type: 'file_version_retention', id: '112733' } ],
limit: 100,
order: [ { by: 'file_version_id', direction: 'ASC' } ] }
*/
});{
"entries": [
{
"applied_at": "2012-12-12T10:53:43-08:00",
"disposition_at": "2012-12-12T10:53:43-08:00",
"file": {
"etag": "1",
"id": "12345",
"type": "file",
"file_version": {
"id": "12345",
"type": "file_version",
"sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
},
"name": "Contract.pdf",
"sequence_id": "3",
"sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37"
},
"file_version": {
"id": "12345",
"type": "file_version",
"sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
},
"id": "11446498",
"type": "file_version_retention",
"winning_retention_policy": {
"id": "12345",
"type": "retention_policy",
"disposition_action": "permanently_delete",
"policy_name": "Some Policy Name",
"retention_length": "365"
}
}
],
"limit": 1000,
"next_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii",
"prev_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVih"
}