LegalHoldsModule
public class LegalHoldsModule
Undocumented
-
Get information about a legal hold policy.
Declaration
Swift
public func get( policyId: String, fields: [String]? = nil, completion: @escaping Callback<LegalHoldPolicy> )Parameters
policyIdThe ID of the Legal Hold Policy on which to retrieve information.
fieldsString array of fields to include in the response. Any attribute in the full Legal Hold Policy objects can be passed in the fields parameter to get specific attributes.
completionReturns a LegalHoldPolicy response object if successful otherwise a BoxSDKError.
-
Create a new legal hold policy.
Declaration
Swift
public func create( policyName: String, description: String? = nil, filterStartedAt: Date? = nil, filterEndedAt: Date? = nil, isOngoing: Bool? = nil, fields: [String]? = nil, completion: @escaping Callback<LegalHoldPolicy> )Parameters
policyNameName of Legal Hold Policy
descriptionDescription of Legal Hold Policy
filterStartedAtDate filter applies to Custodian assignments only
filterEndedAtDate filter applies to Custodian assignments only
isOngoingAfter initialization, Assignments under this Policy will continue applying to files based on events, indefinitely
fieldsString array of fields to include in the response. Any attribute in the full Legal Hold Policy objects can be passed in the fields parameter to get specific attributes.
completionReturns a LegalHoldPolicy response object if successful otherwise a BoxSDKError.
-
Update a legal hold policy.
Declaration
Swift
public func update( policyId: String, policyName: String? = nil, description: String? = nil, releaseNotes: String? = nil, fields: [String]? = nil, completion: @escaping Callback<LegalHoldPolicy> )Parameters
policyIdID of the Legal Hold Policy to update
policyNameName of Legal Hold Policy
descriptionDescription of Legal Hold Policy
releaseNotesNotes around why the policy was released
fieldsString array of fields to include in the response. Any attribute in the full Legal Hold Policy objects can be passed in the fields parameter to get specific attributes.
completionReturns a LegalHoldPolicy response object if successful otherwise a BoxSDKError.
-
Deletes a legal hold policy.
Declaration
Swift
public func delete( policyId: String, completion: @escaping Callback<Void> )Parameters
policyIdThe ID of the legal hold policy to delete.
completionReturns Void if the legal hold policy is deleted.
-
Get all of the legal hold policies for the enterprise.
Declaration
Swift
public func listForEnterprise( policyName: String? = nil, marker: String? = nil, limit: Int? = nil, fields: [String]? = nil ) -> PaginationIterator<LegalHoldPolicy>Parameters
policyNameCase insensitive prefix-match filter on Policy name.
markerThe position marker at which to begin the response. See marker-based paging for details. This parameter cannot be used simultaneously with the ‘offset’ parameter.
limitThe maximum number of items to return. The default is 100 and the maximum is 1,000.
fieldsString array of fields to include in the response. Any attribute in the full Legal Hold Policy objects can be passed in the fields parameter to get specific attributes.
-
Get information about a policy assignmnet.
Declaration
Swift
public func getPolicyAssignment( assignmentId: String, fields: [String]? = nil, completion: @escaping Callback<LegalHoldPolicyAssignment> )Parameters
assignmentIdThe ID of the policy assignment on which to retrieve information.
fieldsString array of fields to include in the response. Any attribute in the full Legal Hold Policy Assingment objects can be passed in the fields parameter to get specific attributes.
completionReturns a LegalHoldPolicyAssignment response object if successful otherwise a BoxSDKError.
-
Assign a legal hold to a file, file version, folder, or user.
Declaration
Swift
public func assignPolicy( policyId: String, assignToId: String, assignToType: String, fields: [String]? = nil, completion: @escaping Callback<LegalHoldPolicyAssignment> )Parameters
policyIdName of Legal Hold Policy
assignToIdID of box item to assign policy to
assignToTypeType of box item to assign policy to
isOngoingAfter initialization, Assignments under this Policy will continue applying to files based on events, indefinitely
fieldsString array of fields to include in the response. Any attribute in the full Legal Hold Policy Assignment objects can be passed in the fields parameter to get specific attributes.
completionReturns a LegalHoldPolicyAssignment response object if successful otherwise a BoxSDKError.
-
Sends a request to delete an existing policy assignment.
Declaration
Swift
public func deletePolicyAssignment( assignmentId: String, completion: @escaping Callback<Void> )Parameters
assignmentIdThe ID of the legal hold policy assignment to delete.
completionReturns Void if the legal hold policy assignment is deleted.
-
Get all of the assignments for a legal hold policy.
Declaration
Swift
public func listPolicyAssignments( policyId: String, assignToType: String? = nil, assignToId: String? = nil, marker: String? = nil, limit: Int? = nil, fields: [String]? = nil ) -> PaginationIterator<LegalHoldPolicyAssignment>Parameters
policyIdID of Policy to get Assignments for. Can also specify a part of a URL.
assignToTypeFilter assignments of this type only. Can be file_version, file, folder, or user.
assignToIdFilter assignments to this ID only
markerThe position marker at which to begin the response. See marker-based paging for details. This parameter cannot be used simultaneously with the ‘offset’ parameter.
limitThe maximum number of items to return. The default is 100 and the maximum is 1,000.
fieldsString array of fields to include in the response. Any attribute in the full Legal Hold Policy Assignment objects can be passed in the fields parameter to get specific attributes.
-
Get information about a file version legal hold.
Declaration
Swift
public func getFileVersionPolicy( legalHoldId: String, fields: [String]? = nil, completion: @escaping Callback<FileVersionLegalHold> )Parameters
legalHoldIdThe ID of the legal hold.
fieldsString array of fields to include in the response. Any attribute in the full File Version Legal Hold objects can be passed in the fields parameter to get specific attributes.
completionReturns a FileVersionLegalHold response object if successful otherwise a BoxSDKError.
-
Get all of the non-deleted legal holds for a single legal hold policy
Declaration
Swift
public func listFileVersionPolicies( policyId: String, marker: String? = nil, limit: Int? = nil, fields: [String]? = nil ) -> PaginationIterator<FileVersionLegalHold>Parameters
policyIdID of Legal Hold Policy to get File Version Legal Holds for
markerThe position marker at which to begin the response. See marker-based paging for details.
limitThe maximum number of items to return. The default is 100 and the maximum is 1,000.
fieldsString array of fields to include in the response. Any attribute in the full File Version Legal Hold objects can be passed in the fields parameter to get specific attributes.
LegalHoldsModule Class Reference