List retention policy assignments

get
https://api.box.com/2.0
/retention_policies/:retention_policy_id/assignments

Returns a list of all retention policy assignments associated with a specified retention policy.

Request

application/json

Path Parameters

stringin pathrequired
982312

The ID of the retention policy.

Query Parameters

integer / int64in queryoptional
10001000

The maximum number of items to return per page.

stringin queryoptional
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.

stringin queryoptional
folder

The type of the retention policy assignment to retrieve.

Value is one of folder,enterprise

Response

Returns a list of the retention policy assignments associated with the specified retention policy.

application/jsonClient error

Returns an error if an unknown type is specified.

application/jsonClient error

An unexpected client error.

get
List retention policy assignments
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -X GET https://api.box.com/2.0/retention_policies/982312/assignments \
     -H 'Authorization: Bearer <ACCESS_TOKEN>'
.NET
BoxCollectionMarkerBased<BoxRetentionPolicyAssignment> assignments = await client.RetentionPoliciesManager
    .GetRetentionPolicyAssignmentsAsync(retentionPolicyId: "11111");
Java
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.
}
Node
client.retentionPolicies.getAssignments('123456789', {type: 'folder'})
	.then(assignments => {
		/* assignments -> {
			entries: [ { type: 'retention_policy_assignment', id: '12345678' } ],
			limit: 100,
			next_marker: 'someMarkerString' }
		*/
	});