LegalHoldsModule

public class LegalHoldsModule

Provides management of Legal Holds

  • Get information about a legal hold policy.

    Declaration

    Swift

    public func get(
        policyId: String,
        fields: [String]? = nil,
        completion: @escaping Callback<LegalHoldPolicy>
    )

    Parameters

    policyId

    The ID of the Legal Hold Policy on which to retrieve information.

    fields

    String 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.

    completion

    Returns 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

    policyName

    Name of Legal Hold Policy

    description

    Description of Legal Hold Policy

    filterStartedAt

    Date filter applies to Custodian assignments only

    filterEndedAt

    Date filter applies to Custodian assignments only

    isOngoing

    After initialization, Assignments under this Policy will continue applying to files based on events, indefinitely

    fields

    String 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.

    completion

    Returns 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

    policyId

    ID of the Legal Hold Policy to update

    policyName

    Name of Legal Hold Policy

    description

    Description of Legal Hold Policy

    releaseNotes

    Notes around why the policy was released

    fields

    String 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.

    completion

    Returns 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

    policyId

    The ID of the legal hold policy to delete.

    completion

    Returns 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
    ) -> PagingIterator<LegalHoldPolicy>

    Parameters

    policyName

    Case insensitive prefix-match filter on Policy name.

    marker

    The position marker at which to begin the response. See marker-based paging for details. This parameter cannot be used simultaneously with the ‘offset’ parameter.

    limit

    The maximum number of items to return. The default is 100 and the maximum is 1,000.

    fields

    String 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

    assignmentId

    The ID of the policy assignment on which to retrieve information.

    fields

    String 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.

    completion

    Returns 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

    policyId

    Name of Legal Hold Policy

    assignToId

    ID of box item to assign policy to

    assignToType

    Type of box item to assign policy to

    isOngoing

    After initialization, Assignments under this Policy will continue applying to files based on events, indefinitely

    fields

    String 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.

    completion

    Returns 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

    assignmentId

    The ID of the legal hold policy assignment to delete.

    completion

    Returns 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
    ) -> PagingIterator<LegalHoldPolicyAssignment>

    Parameters

    policyId

    ID of Policy to get Assignments for. Can also specify a part of a URL.

    assignToType

    Filter assignments of this type only. Can be file_version, file, folder, or user.

    assignToId

    Filter assignments to this ID only

    marker

    The position marker at which to begin the response. See marker-based paging for details. This parameter cannot be used simultaneously with the ‘offset’ parameter.

    limit

    The maximum number of items to return. The default is 100 and the maximum is 1,000.

    fields

    String 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

    legalHoldId

    The ID of the legal hold.

    fields

    String 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.

    completion

    Returns 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
    ) -> PagingIterator<FileVersionLegalHold>

    Parameters

    policyId

    ID of Legal Hold Policy to get File Version Legal Holds for

    marker

    The position marker at which to begin the response. See marker-based paging for details.

    limit

    The maximum number of items to return. The default is 100 and the maximum is 1,000.

    fields

    String 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.