Skip to main content
GET
/
file_version_retentions
cURL
curl -i -X GET "https://api.box.com/2.0/file_version_retentions" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
{
  "limit": 1000,
  "next_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii",
  "prev_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVih",
  "entries": [
    {
      "id": "11446498",
      "type": "file_version_retention",
      "file_version": {
        "id": "12345",
        "type": "file_version",
        "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
      },
      "file": {
        "id": "12345",
        "type": "file",
        "etag": "1",
        "sequence_id": "3",
        "name": "Contract.pdf",
        "sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
        "file_version": {
          "id": "12345",
          "type": "file_version",
          "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
        }
      },
      "applied_at": "2012-12-12T10:53:43-08:00",
      "disposition_at": "2012-12-12T10:53:43-08:00",
      "winning_retention_policy": {
        "id": "12345",
        "type": "retention_policy",
        "policy_name": "Some Policy Name",
        "retention_length": "365",
        "disposition_action": "permanently_delete"
      }
    }
  ]
}
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.

Query Parameters

file_id
string

Filters results by files with this ID.

file_version_id
string

Filters results by file versions with this ID.

policy_id
string

Filters results by the retention policy with this ID.

disposition_action
enum<string>

Filters results by the retention policy with this disposition action.

Available options:
permanently_delete,
remove_retention
disposition_before
string

Filters results by files that will have their disposition come into effect before this date.

disposition_after
string

Filters results by files that will have their disposition come into effect after this date.

limit
integer<int64>

The maximum number of items to return per page.

Required range: x <= 1000
marker
string

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.

Response

Returns a list of all file version retentions for the enterprise.

A list of file version retentions.

Note: File retention API is now deprecated. To get information about files and file versions under retention, see files under retention or file versions under retention endpoints.

limit
integer<int64>

The limit that was used for these entries. This will be the same as the limit query parameter unless that value exceeded the maximum value allowed. The maximum value varies by API.

Example:

1000

next_marker
string | null

The marker for the start of the next page of results.

Example:

"JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii"

prev_marker
string | null

The marker for the start of the previous page of results.

Example:

"JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVih"

entries
File version retention · object[]

A list of file version retentions.