Box Developer Documentation
 
    Latest version

    List retention policies

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

    This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.

    Retrieves all of the retention policies for an enterprise.

    Request

    bearer [ACCESS_TOKEN]
    application/json

    Query Parameters

    stringin queryoptional
    21312321

    Filters results by the ID of the user who created policy.

    string arrayin queryoptional
    id,type,name

    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 (int64)in queryoptional
    1000
    1000

    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.

    stringin queryoptional
    Sales Policy

    Filters results by a case sensitive prefix of the name of retention policies.

    stringin queryoptional
    finite

    Filters results by the type of retention policy.

    Value is one of finite,indefinite

    Response

    application/jsonRetention policies

    Returns a list retention policies in the enterprise.

    application/jsonClient error

    Returns a bad_request if a non existent policy_type was specified.

    application/jsonClient error

    Returns a not_found error if the user specified in created_by_user_id does not exist.

    application/jsonClient error

    An unexpected client error.

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

    Request Example

    Response Example

    {
      "entries": [
        {
          "id": "12345",
          "type": "retention_policy",
          "disposition_action": "permanently_delete",
          "policy_name": "Some Policy Name",
          "retention_length": "365",
          "are_owners_notified": false,
          "assignment_counts": {
            "enterprise": 1,
            "folder": 1,
            "metadata_template": 1
          },
          "can_owner_extend_retention": false,
          "created_at": "2012-12-12T10:53:43-08:00",
          "created_by": {
            "id": "11446498",
            "type": "user",
            "login": "ceo@example.com",
            "name": "Aaron Levie"
          },
          "custom_notification_recipients": [
            {
              "id": "11446498",
              "type": "user",
              "login": "ceo@example.com",
              "name": "Aaron Levie"
            }
          ],
          "description": "Policy to retain all reports for at least one month",
          "modified_at": "2012-12-12T10:53:43-08:00",
          "policy_type": "finite",
          "retention_type": "non_modifiable",
          "status": "active"
        }
      ],
      "limit": 1000,
      "next_marker": "JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii"
    }