Class: LegalHoldPolicies

LegalHoldPolicies(client) → {void}

Simple manager for interacting with all Legal Holds endpoints and actions.

Constructor

new LegalHoldPolicies(client) → {void}

Parameters:
Name Type Description
client BoxClient The Box API Client that is responsible for making calls to the API
Source:
Returns:
Type
void

Members

(readonly) assignmentTypes :LegalHoldPolicyAssignmentType

Enum of valid policy assignment types, which specify what object the policy applies to
Type:
Source:

Methods

assign(policyID, assignType, assignID, callbackopt) → {Promise.<Object>}

Assign a lehal hold policy to an object API Endpoint: '/legal_hold_policy_assignments Method: POST
Parameters:
Name Type Attributes Description
policyID string The ID of the policy to assign
assignType LegalHoldPolicyAssignmentType The type of object the policy will be assigned to
assignID string The Box ID of the object to assign the legal hold policy to
callback function <optional>
Passed the new assignment object if successful, error otherwise
Source:
Returns:
A promise resolving to the created assignment object
Type
Promise.<Object>

assign(policyID, assignType, assignID, callbackopt) → {Promise.<Object>}

Assign a lehal hold policy to an object API Endpoint: '/legal_hold_policy_assignments Method: POST
Parameters:
Name Type Attributes Description
policyID string The ID of the policy to assign
assignType LegalHoldPolicyAssignmentType The type of object the policy will be assigned to
assignID string The Box ID of the object to assign the legal hold policy to
callback function <optional>
Passed the new assignment object if successful, error otherwise
Source:
Returns:
A promise resolving to the created assignment object
Type
Promise.<Object>

create(name, optionsopt, callbackopt) → {Promise.<Object>}

Used to create a single legal hold policy for an enterprise API Endpoint: '/legal_hold_policies' Method: POST
Parameters:
Name Type Attributes Description
name string The name of the legal hold policy to be created
options Object <optional>
Additional parameters
Properties
Name Type Attributes Description
description string <optional>
Description of the legal hold policy
filter_started_at string <optional>
Date filter, any Custodian assignments will apply only to file versions created or uploaded inside of the date range
filter_ended_at string <optional>
Date filter, any Custodian assignments will apply only to file versions created or uploaded inside of the date range
is_ongoing boolean <optional>
After initialization, Assignments under this Policy will continue applying to files based on events, indefinitely
callback function <optional>
Passed the new policy information if it was acquired successfully, error otherwise
Source:
Returns:
A promise resolving to the created policy
Type
Promise.<Object>

create(name, optionsopt, callbackopt) → {Promise.<Object>}

Used to create a single legal hold policy for an enterprise API Endpoint: '/legal_hold_policies' Method: POST
Parameters:
Name Type Attributes Description
name string The name of the legal hold policy to be created
options Object <optional>
Additional parameters
Properties
Name Type Attributes Description
description string <optional>
Description of the legal hold policy
filter_started_at string <optional>
Date filter, any Custodian assignments will apply only to file versions created or uploaded inside of the date range
filter_ended_at string <optional>
Date filter, any Custodian assignments will apply only to file versions created or uploaded inside of the date range
is_ongoing boolean <optional>
After initialization, Assignments under this Policy will continue applying to files based on events, indefinitely
callback function <optional>
Passed the new policy information if it was acquired successfully, error otherwise
Source:
Returns:
A promise resolving to the created policy
Type
Promise.<Object>

delete(policyID, callbackopt) → {Promise.<void>}

Sends request to delete an existing legal hold policy. Note that this is an asynchronous process - the policy will not be fully deleted yet when the response comes back. API Endpoint: '/legal_hold_policies/:policyID' Method: DELETE
Parameters:
Name Type Attributes Description
policyID string The legal hold policy to delete
callback function <optional>
Passed nothing if successful, error otherwise
Source:
Returns:
A promise resolving to nothing
Type
Promise.<void>

delete(policyID, callbackopt) → {Promise.<void>}

Sends request to delete an existing legal hold policy. Note that this is an asynchronous process - the policy will not be fully deleted yet when the response comes back. API Endpoint: '/legal_hold_policies/:policyID' Method: DELETE
Parameters:
Name Type Attributes Description
policyID string The legal hold policy to delete
callback function <optional>
Passed nothing if successful, error otherwise
Source:
Returns:
A promise resolving to nothing
Type
Promise.<void>

deleteAssignment(assignmentID, callbackopt) → {Promise.<void>}

Sends request to delete an existing legal hold policy. Note that this is an asynchronous process - the policy will not be fully deleted yet when the response comes back. API Endpoint: '/legal_hold_policy_assignments/:assignmentID' Method: DELETE
Parameters:
Name Type Attributes Description
assignmentID string The legal hold policy assignment to delete
callback function <optional>
Passed nothing if successful, error otherwise
Source:
Returns:
A promise resolving to nothing
Type
Promise.<void>

deleteAssignment(assignmentID, callbackopt) → {Promise.<void>}

Sends request to delete an existing legal hold policy. Note that this is an asynchronous process - the policy will not be fully deleted yet when the response comes back. API Endpoint: '/legal_hold_policy_assignments/:assignmentID' Method: DELETE
Parameters:
Name Type Attributes Description
assignmentID string The legal hold policy assignment to delete
callback function <optional>
Passed nothing if successful, error otherwise
Source:
Returns:
A promise resolving to nothing
Type
Promise.<void>

get(policyID, optionsopt, callbackopt) → {Promise.<Object>}

Fetches details about a specific legal hold policy API Endpoint: '/legal_hold_policies/:policyID' Method: GET
Parameters:
Name Type Attributes Description
policyID string The Box ID of the legal hold policy being requested
options Object <optional>
Additional options for the request. Can be left null in most cases.
callback function <optional>
Passed the policy information if it was acquired successfully, error otherwise
Source:
Returns:
A promise resolving to the policy object
Type
Promise.<Object>

get(policyID, optionsopt, callbackopt) → {Promise.<Object>}

Fetches details about a specific legal hold policy API Endpoint: '/legal_hold_policies/:policyID' Method: GET
Parameters:
Name Type Attributes Description
policyID string The Box ID of the legal hold policy being requested
options Object <optional>
Additional options for the request. Can be left null in most cases.
callback function <optional>
Passed the policy information if it was acquired successfully, error otherwise
Source:
Returns:
A promise resolving to the policy object
Type
Promise.<Object>

getAll(optionsopt, callbackopt) → {Promise.<Object>}

Fetches a list of legal hold policies for the enterprise API Endpoint: '/legal_hold_policies' Method: GET
Parameters:
Name Type Attributes Description
options Object <optional>
Additional options for the request. Can be left null in most cases.
Properties
Name Type Attributes Description
policy_name string <optional>
A full or partial name to filter the legal hold policies by
limit int <optional>
Limit result size to this number
marker string <optional>
Paging marker, leave blank to start at the first page
callback function <optional>
Passed the policy objects if they were acquired successfully, error otherwise
Source:
Returns:
A promise resolving to the collection of policies
Type
Promise.<Object>

getAll(optionsopt, callbackopt) → {Promise.<Object>}

Fetches a list of legal hold policies for the enterprise API Endpoint: '/legal_hold_policies' Method: GET
Parameters:
Name Type Attributes Description
options Object <optional>
Additional options for the request. Can be left null in most cases.
Properties
Name Type Attributes Description
policy_name string <optional>
A full or partial name to filter the legal hold policies by
limit int <optional>
Limit result size to this number
marker string <optional>
Paging marker, leave blank to start at the first page
callback function <optional>
Passed the policy objects if they were acquired successfully, error otherwise
Source:
Returns:
A promise resolving to the collection of policies
Type
Promise.<Object>

getAllFileVersionLegalHolds(policyID, optionsopt, callbackopt) → {Promise.<Object>}

Get a list of legal hold records for held file versions in an enterprise. API Endpoint: '/file_version_legal_holds' Method: GET
Parameters:
Name Type Attributes Description
policyID string ID of Legal Hold Policy to get File Version Legal Holds for
options Object <optional>
Additional options for the request. Can be left null in most cases.
callback function <optional>
Pass the file version legal holds records if successful, error otherwise
Source:
Returns:
A promise resolving to the collection of all file version legal holds
Type
Promise.<Object>

getAllFileVersionLegalHolds(policyID, optionsopt, callbackopt) → {Promise.<Object>}

Get a list of legal hold records for held file versions in an enterprise. API Endpoint: '/file_version_legal_holds' Method: GET
Parameters:
Name Type Attributes Description
policyID string ID of Legal Hold Policy to get File Version Legal Holds for
options Object <optional>
Additional options for the request. Can be left null in most cases.
callback function <optional>
Pass the file version legal holds records if successful, error otherwise
Source:
Returns:
A promise resolving to the collection of all file version legal holds
Type
Promise.<Object>

getAssignment(assignmentID, optionsopt, callbackopt) → {Promise.<Object>}

Fetch a specific policy assignment API Endpoint: '/legal_hold_policy_assignments/:assignmentID' Method: GET
Parameters:
Name Type Attributes Description
assignmentID string The Box ID of the policy assignment object to fetch
options Object <optional>
Additional options for the request. Can be left null in most cases.
callback function <optional>
Passed the assignment object if it was acquired successfully, error otherwise
Source:
Returns:
A promise resolving to the assignment object
Type
Promise.<Object>

getAssignment(assignmentID, optionsopt, callbackopt) → {Promise.<Object>}

Fetch a specific policy assignment API Endpoint: '/legal_hold_policy_assignments/:assignmentID' Method: GET
Parameters:
Name Type Attributes Description
assignmentID string The Box ID of the policy assignment object to fetch
options Object <optional>
Additional options for the request. Can be left null in most cases.
callback function <optional>
Passed the assignment object if it was acquired successfully, error otherwise
Source:
Returns:
A promise resolving to the assignment object
Type
Promise.<Object>

getAssignments(policyID, optionsopt, callbackopt) → {Promise.<Object>}

Fetch a list of assignments for a given legal hold policy API Endpoint: '/legal_hold_policies/:policyID/assignments' Method: GET
Parameters:
Name Type Attributes Description
policyID string The Box ID of the legal hold policy to get assignments for
options Object <optional>
Additional options for the request. Can be left null in most cases.
Properties
Name Type Attributes Description
assign_to_type LegalHoldPolicyAssignmentType <optional>
Filter assignments of this type only
assign_to_id string <optional>
Filter assignments to this ID only. Note that this will only show assignments applied directly to this entity.
callback function <optional>
Passed the assignment objects if they were acquired successfully, error otherwise
Source:
Returns:
A promise resolving to the collection of policy assignments
Type
Promise.<Object>

getAssignments(policyID, optionsopt, callbackopt) → {Promise.<Object>}

Fetch a list of assignments for a given legal hold policy API Endpoint: '/legal_hold_policies/:policyID/assignments' Method: GET
Parameters:
Name Type Attributes Description
policyID string The Box ID of the legal hold policy to get assignments for
options Object <optional>
Additional options for the request. Can be left null in most cases.
Properties
Name Type Attributes Description
assign_to_type LegalHoldPolicyAssignmentType <optional>
Filter assignments of this type only
assign_to_id string <optional>
Filter assignments to this ID only. Note that this will only show assignments applied directly to this entity.
callback function <optional>
Passed the assignment objects if they were acquired successfully, error otherwise
Source:
Returns:
A promise resolving to the collection of policy assignments
Type
Promise.<Object>

getFileVersionLegalHold(legalHoldID, optionsopt, callbackopt) → {Promise.<Object>}

Get the specific legal hold record for a held file version. API Endpoint: '/file_version_legal_holds/:legalHoldID' Method: GET
Parameters:
Name Type Attributes Description
legalHoldID string The ID for the file legal hold record to retrieve
options Object <optional>
Additional options for the request. Can be left null in most cases.
callback function <optional>
Pass the file version legal hold record if successful, error otherwise
Source:
Returns:
A promise resolving to the legal hold record
Type
Promise.<Object>

getFileVersionLegalHold(legalHoldID, optionsopt, callbackopt) → {Promise.<Object>}

Get the specific legal hold record for a held file version. API Endpoint: '/file_version_legal_holds/:legalHoldID' Method: GET
Parameters:
Name Type Attributes Description
legalHoldID string The ID for the file legal hold record to retrieve
options Object <optional>
Additional options for the request. Can be left null in most cases.
callback function <optional>
Pass the file version legal hold record if successful, error otherwise
Source:
Returns:
A promise resolving to the legal hold record
Type
Promise.<Object>

update(policyID, updates, callbackopt) → {Promise.<Object>}

Update or modify a legal hold policy. API Endpoint: '/legal_hold_policies/:policyID' Method: PUT
Parameters:
Name Type Attributes Description
policyID string The Box ID of the legal hold policy to update
updates Object The information to be updated
Properties
Name Type Attributes Description
policy_name string <optional>
Name of Legal Hold Policy
description string <optional>
Description of Legal Hold Policy
release_notes string <optional>
Notes around why the policy was released
callback function <optional>
Passed the updated policy information if it was acquired successfully, error otherwise
Source:
Returns:
A promise resolving to the updated policy
Type
Promise.<Object>

update(policyID, updates, callbackopt) → {Promise.<Object>}

Update or modify a legal hold policy. API Endpoint: '/legal_hold_policies/:policyID' Method: PUT
Parameters:
Name Type Attributes Description
policyID string The Box ID of the legal hold policy to update
updates Object The information to be updated
Properties
Name Type Attributes Description
policy_name string <optional>
Name of Legal Hold Policy
description string <optional>
Description of Legal Hold Policy
release_notes string <optional>
Notes around why the policy was released
callback function <optional>
Passed the updated policy information if it was acquired successfully, error otherwise
Source:
Returns:
A promise resolving to the updated policy
Type
Promise.<Object>