Manage Applications

    Inspect legal hold on file

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

    Retrieves information about the legal hold policies assigned to a file version.

    Request

    application/json

    Path Parameters

    Response

    application/jsonLegal Hold

    Returns the legal hold policy assignments for the file version.

    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/2348213 \
         -H "Authorization: Bearer <ACCESS_TOKEN>"
    .NET
    BoxFileVersionLegalHold hold = await client.LegalHoldPoliciesManager
        .GetFileVersionLegalHoldAsync("55555");
    Java
    BoxFileVersionLegalHold hold = new BoxFileVersionLegalHold(api, id);
    hold.getInfo("file");
    Python
    file_version_legal_hold_id = '55555'
    legal_hold = client.legal_hold(file_version_legal_hold_id).get()
    print('Version {0} of file {1} is held by {2} assignment(s)'.format(
        legal_hold.file_version.id,
        legal_hold.file.id,
        len(legal_hold.legal_hold_policy_assignments),
    ))
    Node
    client.legalHoldPolicies.getFileVersionLegalHold('55555')
    	.then(fileVersionHold => {
    		/* fileVersionHold -> {
    			type: 'legal_hold',
    			id: '55555',
    			file_version: { type: 'file_version', id: '123456789' },
    			file: { type: 'file', id: '66666', etag: '1' },
    			legal_hold_policy_assignments: 
    			[ { type: 'legal_hold_policy_assignment', id: '22222' },
    				{ type: 'legal_hold_policy_assignment', id: '33333' } ],
    			deleted_at: null }
    		*/
    	});

    Response Example

    {
      "id": 11446498,
      "type": "file_version_legal_hold",
      "file_version": {
        "id": 11446498,
        "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"
    }