box-node-sdk

LegalHoldPolicyAssignmentsManager

Retrieves a list of items a legal hold policy has been assigned to.

This operation is performed by calling function getLegalHoldPolicyAssignments.

See the endpoint docs at API Reference.

await client.legalHoldPolicyAssignments.getLegalHoldPolicyAssignments({
  policyId: legalHoldPolicyId,
} satisfies GetLegalHoldPolicyAssignmentsQueryParams);

Arguments

Returns

This function returns a value of type LegalHoldPolicyAssignments.

Returns a list of legal hold policy assignments.

Assign a legal hold to a file, file version, folder, or user.

This operation is performed by calling function createLegalHoldPolicyAssignment.

See the endpoint docs at API Reference.

await client.legalHoldPolicyAssignments.createLegalHoldPolicyAssignment({
  policyId: legalHoldPolicyId,
  assignTo: {
    type: 'file' as CreateLegalHoldPolicyAssignmentRequestBodyAssignToTypeField,
    id: fileId,
  } satisfies CreateLegalHoldPolicyAssignmentRequestBodyAssignToField,
} satisfies CreateLegalHoldPolicyAssignmentRequestBody);

Arguments

Returns

This function returns a value of type LegalHoldPolicyAssignment.

Returns a new legal hold policy assignment.

Retrieve a legal hold policy assignment.

This operation is performed by calling function getLegalHoldPolicyAssignmentById.

See the endpoint docs at API Reference.

await client.legalHoldPolicyAssignments.getLegalHoldPolicyAssignmentById(
  legalHoldPolicyAssignmentId,
);

Arguments

Returns

This function returns a value of type LegalHoldPolicyAssignment.

Returns a legal hold policy object.

Remove a legal hold from an item.

This is an asynchronous process. The policy will not be fully removed yet when the response returns.

This operation is performed by calling function deleteLegalHoldPolicyAssignmentById.

See the endpoint docs at API Reference.

await client.legalHoldPolicyAssignments.deleteLegalHoldPolicyAssignmentById(
  legalHoldPolicyAssignmentId,
);

Arguments

Returns

This function returns a value of type undefined.

A blank response is returned if the assignment was successfully deleted.

Get a list of files with current file versions for a legal hold assignment.

In some cases you may want to get previous file versions instead. In these cases, use the GET /legal_hold_policy_assignments/:id/file_versions_on_hold API instead to return any previous versions of a file for this legal hold policy assignment.

Due to ongoing re-architecture efforts this API might not return all file versions held for this policy ID. Instead, this API will only return the latest file version held in the newly developed architecture. The GET /file_version_legal_holds API can be used to fetch current and past versions of files held within the legacy architecture.

This endpoint does not support returning any content that is on hold due to a Custodian collaborating on a Hub.

The GET /legal_hold_policy_assignments?policy_id={id} API can be used to find a list of policy assignments for a given policy ID.

This operation is performed by calling function getLegalHoldPolicyAssignmentFileOnHold.

See the endpoint docs at API Reference.

await client.legalHoldPolicyAssignments.getLegalHoldPolicyAssignmentFileOnHold(
  legalHoldPolicyAssignmentId,
);

Arguments

Returns

This function returns a value of type FilesOnHold.

Returns the list of current file versions held under legal hold for a specific legal hold policy assignment.