Sample - Box Platform API
GET/retention_policy_assignments/{retention_policy_assignment_id}

Get a retention policy assignment

Retrieves a retention policy assignment by its identifier. Use fields to request additional assignment attributes that are not included in the standard response. The response identifies the retained target, associated policy, assignment time, and any metadata filter fields.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
retention_policy_assignment_idstringrequired
The unique identifier of the retention policy assignment to retrieve.
fieldsarray<string>optional
A comma-separated list of assignment attributes to include in the response. Specifying this parameter limits the response to the mini representation and the requested fields.

2 status codes
200Returns the requested retention policy assignment object.
idstringrequired
The unique identifier for a retention policy assignment.
typestringrequired
The value will always be `retention_policy_assignment`.
Allowed:retention_policy_assignment
retention_policyobjectoptional
assigned_toobjectoptional
The `type` and `id` of the content that is under retention. The `type` can either be `folder` `enterprise`, or `metadata_template`.
filter_fieldsarray<object>optional
An array of field objects. Values are only returned if the `assigned_to` type is `metadata_template`. Otherwise, the array is blank.
assigned_byobjectoptional
assigned_atstringoptional
When the retention policy assignment object was created.
start_date_fieldstringoptional
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.
defaultReturns an unexpected client error.
typestringoptional
The value will always be `error`.
Allowed:error
statusintegeroptional
The HTTP status of the response.
codestringoptional
A Box-specific error code.
Allowed:createdacceptedno_contentredirectnot_modifiedbad_requestunauthorizedforbiddennot_foundmethod_not_allowedconflictprecondition_failed
messagestringoptional
A short message describing the error.
context_infoobjectoptional
A free-form object that contains additional context about the error. The possible fields are defined on a per-endpoint basis. `message` is only one example.
help_urlstringoptional
A URL that links to more information about why this error occurred.
request_idstringoptional
A unique identifier for this response, which can be used when contacting Box support.

Error handling

retention_policy_assignment_id must identify the retention policy assignment you want to retrieve. Each value in fields must name an assignment attribute; specifying fields changes which standard attributes are returned.