List legal holds for policy

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

Get list of non-deleted legal holds for a single legal hold policy.

Request

application/json

Query Parameters

integer / int64in queryoptional
10001000-1000

The maximum number of items to return per page.

stringin queryoptional
JV9IRGZmieiBasejOG9yDCRNgd2ymoZIbjsxbJMjIs3kioVii

The position marker at which to begin the response.

This requires usemarker to be set to true.

stringin queryrequired
133870

The ID of the legal hold policy to get the file version legal holds for.

Response

Returns the list of file version legal holds for a specific legal hold policy.

You can now try out some of our APIs live, right here in the documentation.
Log In

Request Example

cURL
curl -X GET https://api.box.com/2.0/file_version_legal_holds?policy_id=133870 \
     -H "Authorization: Bearer <ACCESS_TOKEN>"
.NET
BoxCollectionMarkerBased<BoxFileVersionLegalHold> holds = await client.LegalHoldPoliciesManager
    .GetFileVersionLegalHoldsAsync(policyId: "11111");
Java
BoxLegalHoldPolicy policy = new BoxLegalHoldPolicy(api, id);
Iterable<BoxFileVersionLegalHold.Info> fileVersionHolds = policy.getFileVersionHolds();
for (BoxFileVersionLegalHold.Info fileVersionHold : fileVersionHolds) {
	// Do something with the file version legal hold.
}
Python
legal_holds = client.legal_hold_policy(policy_id='12345').get_file_version_legal_holds()
for legal_hold in legal_holds:
    print('Got file version legal hold with ID {0}'.format(legal_hold.id))
Node
client.legalHoldPolicies.getAllFileVersionLegalHolds('11111')
	.then(holds => {
		/* holds -> {
			entries: 
			[ { type: 'legal_hold', id: '22222' },
				{ type: 'legal_hold', id: '33333' },
				{ type: 'legal_hold', id: '44444' } ],
			limit: 100,
			order: 
			[ { by: 'retention_policy_set_id, file_version_id',
				direction: 'ASC' } ] }
		*/
	});

Response Example

{
  "limit": 1000,
  "next_marker": 3000,
  "prev_marker": 1000,
  "entries": [
    {
      "id": 11446498,
      "type": "file_version_legal_hold",
      "file_version": {
        "id": 12345,
        "type": "file_version",
        "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
      },
      "file": {
        "id": 12345,
        "etag": 1,
        "type": "file",
        "sequence_id": 3,
        "name": "Contract.pdf"
      },
      "legal_hold_policy_assignments": [
        {
          "id": 11446498,
          "type": "legal_hold_policy_assignment",
          "legal_hold_policy": {
            "id": 11446498,
            "type": "legal_hold_policy"
          },
          "assigned_to": {
            "id": 11446498,
            "type": "file",
            "sequence_id": 3,
            "etag": 1,
            "name": "Pictures"
          },
          "assigned_by": {
            "id": 11446498,
            "type": "user",
            "name": "Aaron Levie",
            "login": "ceo@example.com"
          },
          "assigned_at": "2012-12-12T10:53:43-08:00",
          "deleted_at": "2012-12-12T10:53:43-08:00"
        }
      ],
      "deleted_at": "2012-12-12T10:53:43-08:00"
    }
  ]
}