List retention policy assignments


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



Path Parameters

stringin pathrequired

The ID of the retention policy.

Query Parameters

stringin queryoptional

The type of the retention policy assignment to retrieve.

Value is one of folder,enterprise,metadata_template

string arrayin queryoptional

A 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.

integer / int64in queryoptional

The maximum number of items to return per page.

stringin queryoptional

Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination.


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.

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

Request Example

curl -i -X GET "" \
     -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.
	.getAssignments('123456789', { type: 'folder' })
	.then((assignments) => {
		/* assignments -> {
			entries: [ { type: 'retention_policy_assignment', id: '12345678' } ],
			limit: 100,
			next_marker: 'someMarkerString' }
let iterator = client.retentionPolicy.listAssignments(policyId:"12345") { results in
    switch results {
    case let .success(page):
        for assignment in page.entries {
            print("Retention policy assignment\(")
    case let .failure(error):

Response Example

  "entries": [
      "id": "12345",
      "type": "retention_policy_assignment"
  "limit": 1000,
  "next_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii"