Returns a list of all retention policy assignments associated with a specified retention policy.
982312
The ID of the retention policy.
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
.
folder
The type of the retention policy assignment to retrieve.
Value is one of folder
,enterprise
Returns a list of the retention policy assignments associated with the specified retention policy.
Returns an error if an unknown type
is specified.
An unexpected client error.
curl -X GET https://api.box.com/2.0/retention_policies/982312/assignments \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
BoxCollectionMarkerBased<BoxRetentionPolicyAssignment> assignments = await client.RetentionPoliciesManager
.GetRetentionPolicyAssignmentsAsync(retentionPolicyId: "11111");
BoxRetentionPolicy policy = new BoxRetentionPolicy(api, id);
Iterable<BoxRetentionPolicyAssignment.Info> allAssignments = policy.getAllAssignments("assigned_by");
Iterable<BoxRetentionPolicyAssignment.Info> folderAssignments = policy.getFolderAssignments(50, "assigned_by");
Iterable<BoxRetentionPolicyAssignment.Info> enterpriseAssignments = policy.getEnterpriseAssignments();
for (BoxRetentionPolicyAssignments.Info assignmentInfo : allAssignments) {
// Do something with the assignment.
}
for (BoxRetentionPolicyAssignments.Info assignmentInfo : folderAssignments) {
// Do something with the assignment.
}
for (BoxRetentionPolicyAssignments.Info assignmentInfo : enterpriseAssignments) {
// Do something with the assignment.
}
client.retentionPolicies.getAssignments('123456789', {type: 'folder'})
.then(assignments => {
/* assignments -> {
entries: [ { type: 'retention_policy_assignment', id: '12345678' } ],
limit: 100,
next_marker: 'someMarkerString' }
*/
});