Skip to main content
GET
/
retention_policy_assignments
/
{retention_policy_assignment_id}
cURL
curl -i -X GET "https://api.box.com/2.0/retention_policy_assignments/1233123" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
{
  "id": "11446498",
  "type": "retention_policy_assignment",
  "retention_policy": {
    "id": "12345",
    "type": "retention_policy",
    "policy_name": "Some Policy Name",
    "retention_length": "365",
    "disposition_action": "permanently_delete"
  },
  "assigned_to": {
    "id": "a983f69f-e85f-4ph4-9f46-4afdf9c1af65",
    "type": "metadata_template"
  },
  "filter_fields": [
    {
      "field": "a0f4ee4e-1dc1-4h90-a8a9-aef55fc681d4",
      "value": "0c27b756-0p87-4fe0-a43a-59fb661ccc4e"
    }
  ],
  "assigned_by": {
    "id": "11446498",
    "type": "user",
    "name": "Aaron Levie",
    "login": "[email protected]"
  },
  "assigned_at": "2012-12-12T10:53:43-08:00",
  "start_date_field": "upload_date"
}
This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.Learn more about Box SDK versioning strategy.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

retention_policy_assignment_id
string
required

The ID of the retention policy assignment.

Query Parameters

fields
string[]

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.

Response

Returns the retention policy assignment object.

A retention assignment represents a rule specifying the files a retention policy retains. Assignments can retain files based on their folder or metadata, or hold all files in the enterprise.

id
string
required

The unique identifier for a retention policy assignment.

Example:

"11446498"

type
enum<string>
required

The value will always be retention_policy_assignment.

Available options:
retention_policy_assignment
Example:

"retention_policy_assignment"

retention_policy
Retention policy (Mini) · object

A mini representation of a retention policy object that has been assigned to the content.

assigned_to
object

The type and id of the content that is under retention. The type can either be folder enterprise, or metadata_template.

filter_fields
(object | null)[] | null

An array of field objects. Values are only returned if the assigned_to type is metadata_template. Otherwise, the array is blank.

assigned_by
User (Mini) · object

A mini user object representing the user that created the retention policy assignment.

assigned_at
string<date-time>

When the retention policy assignment object was created.

Example:

"2012-12-12T10:53:43-08:00"

start_date_field
string

The date the retention policy assignment begins. If the assigned_to type is metadata_template, this field can be a date field's metadata attribute key id.

Example:

"upload_date"