Logo
latest
  • User Guides
    • Getting Started
    • Basics
    • Executing Searches
    • Departing Employees
    • High Risk Employees
    • Get Active Devices From an Organization
    • Device Settings
    • Org Settings
    • Backup Sets
    • Cases
    • Trust Settings
    • V2 File Events
    • User Risk Profile
    • Watchlists
  • Method Documentation
    • Alert Rules
    • Alerts
    • Archive
    • Audit Logs
    • Backup Sets
    • Cases
    • Shared Constants
    • Detection Lists
    • Devices
    • Device Settings
    • Exceptions
    • File Event Queries - V1 (DEPRECATED)
    • File Event Queries - V2
    • Legal Hold
    • Legal Hold - API Clients
    • Orgs
    • Org Settings
    • Response
    • Security Data
    • Shared Query Filters
    • Trusted Activities
    • User Risk Profiles
    • Users
    • Util
    • Watchlists
py42
  • »
  • Method Documentation »
  • Legal Hold
  • Edit on GitHub

Legal Hold

For legal hold commands compatible with API Client authentication, see Legal Hold - Api Clients.

class py42.services.legalhold.LegalHoldService(connection)

Bases: py42.services.BaseService

A service for interacting with Code42 Legal Hold APIs.

The LegalHoldService provides the ability to manage Code42 Legal Hold Policies and Matters. It can: - Create, view, and list all existing Policies. - Create, view, deactivate, reactivate, and list all existing Matters. - Add/remove Custodians from a Matter.

add_to_matter(user_uid, legal_hold_uid)

Add a user (Custodian) to a Legal Hold Matter.

Parameters
  • user_uid (str) – The identifier of the user.

  • legal_hold_uid (str) – The identifier of the Legal Hold Matter.

Returns

py42.response.Py42Response

create_matter(name, hold_policy_uid, description=None, notes=None, hold_ext_ref=None)

Creates a new, active Legal Hold Matter.

Parameters
  • name (str) – The name of the new Legal Hold Matter.

  • hold_policy_uid (str) – The identifier of the Preservation Policy that will apply to this Matter.

  • description (str, optional) – An optional description of the Matter. Defaults to None.

  • notes (str, optional) – Optional notes information. Defaults to None.

  • hold_ext_ref (str, optional) – Optional external reference information. Defaults to None.

Returns

py42.response.Py42Response

create_policy(name, policy=None)

Creates a new Legal Hold Preservation Policy.

Parameters
  • name (str) – The name of the new Policy.

  • policy (dict, optional) – The desired Preservation Policy settings as a dict. Defaults to None (where the server-default backup set is used).

Returns

py42.response.Py42Response

deactivate_matter(legal_hold_uid)

Deactivates and closes a Legal Hold Matter.

Parameters

legal_hold_uid (str) – The identifier of the Legal Hold Matter.

Returns

py42.response.Py42Response

get_all_events(legal_hold_uid=None, min_event_date=None, max_event_date=None)

Gets an individual page of Legal Hold events.

Parameters
  • legal_hold_uid (str, optional) – Find LegalHoldEvents for the Legal Hold Matter with this unique identifier. Defaults to None.

  • min_event_date (str or int or float or datetime, optional) – Find LegalHoldEvents whose eventDate is equal to or after this time. E.g. yyyy-MM-dd HH:MM:SS. Defaults to None.

  • max_event_date (str or int or float or datetime, optional) – Find LegalHoldEvents whose eventDate is equal to or before this time. E.g. yyyy-MM-dd HH:MM:SS. Defaults to None.

Returns

An object that iterates over py42.response.Py42Response objects that each contain a page of LegalHoldEvent objects.

Return type

generator

get_all_matter_custodians(legal_hold_uid=None, user_uid=None, user=None, active=True)

Gets all Legal Hold memberships.

Each user (Custodian) who has been added to a Legal Hold Matter is returned by the server as a LegalHoldMembership object in the response body. If the object’s active state is “INACTIVE”, they have been removed from the Matter and are no longer subject to the Legal Hold retention rules. Users can be Custodians of multiple Legal Holds at once (and thus would be part of multiple LegalHoldMembership objects).

Parameters
  • legal_hold_uid (str, optional) – Find LegalHoldMemberships for the Legal Hold Matter with this unique identifier. Defaults to None.

  • user_uid (str, optional) – Find LegalHoldMemberships for the user with this identifier. Defaults to None.

  • user (str, optional) – Find LegalHoldMemberships by flexibly searching on username, email, extUserRef, or last name. Will find partial matches. Defaults to None.

  • active (bool or None, optional) – Find LegalHoldMemberships by their active state. True returns active LegalHoldMemberships, False returns inactive LegalHoldMemberships, None returns all LegalHoldMemberships regardless of state. Defaults to True.

Returns

An object that iterates over py42.response.Py42Response objects that each contain a page of LegalHoldMembership objects.

Return type

generator

get_all_matters(creator_user_uid=None, active=True, name=None, hold_ext_ref=None)

Gets all existing Legal Hold Matters.

Parameters
  • creator_user_uid (str, optional) – Find Matters by the identifier of the user who created them. Defaults to None.

  • active (bool or None, optional) – Find Matters by their active state. True returns active Matters, False returns inactive Matters, None returns all Matters regardless of state. Defaults to True.

  • name (str, optional) – Find Matters with a ‘name’ that either equals or contains this value. Defaults to None.

  • hold_ext_ref (str, optional) – Find Matters having a matching external reference field. Defaults to None.

Returns

An object that iterates over py42.response.Py42Response objects that each contain a page of Legal Hold Matters.

Return type

generator

get_custodians_page(page_num, legal_hold_membership_uid=None, legal_hold_uid=None, user_uid=None, user=None, active=True, page_size=None)

Gets an individual page of Legal Hold memberships. One of the following optional args is required to determine which custodians to retrieve:

legal_hold_membership_uid, legal_hold_uid, user_uid, user

Parameters
  • page_num (int) – The page number to request.

  • legal_hold_membership_uid (str, optional) – Find LegalHoldMemberships with a specific membership UID. Defaults to None.

  • legal_hold_uid (str, optional) – Find LegalHoldMemberships for the Legal Hold Matter with this unique identifier. Defaults to None.

  • user_uid (str, optional) – Find LegalHoldMemberships for the user with this identifier. Defaults to None.

  • user (str, optional) – Find LegalHoldMemberships by flexibly searching on username, email, extUserRef, or last name. Will find partial matches. Defaults to None.

  • active (bool or None, optional) – Find LegalHoldMemberships by their active state. True returns active LegalHoldMemberships, False returns inactive LegalHoldMemberships, None returns all LegalHoldMemberships regardless of state. Defaults to True.

  • page_size (int, optional) – The size of the page. Defaults to py42.settings.items_per_page.

Return type

py42.response.Py42Response

get_events_page(legal_hold_uid=None, min_event_date=None, max_event_date=None, page_num=1, page_size=None)

Gets an individual page of Legal Hold events.

Parameters
  • legal_hold_uid (str, optional) – Find LegalHoldEvents for the Legal Hold Matter with this unique identifier. Defaults to None.

  • min_event_date (str or int or float or datetime, optional) – Find LegalHoldEvents whose eventDate is equal to or after this time. E.g. yyyy-MM-dd HH:MM:SS. Defaults to None.

  • max_event_date (str or int or float or datetime, optional) – Find LegalHoldEvents whose eventDate is equal to or before this time. E.g. yyyy-MM-dd HH:MM:SS. Defaults to None.

  • page_num (int) – The page number to request. Defaults to 1.

  • page_size (int, optional) – The size of the page. Defaults to py42.settings.items_per_page.

Return type

py42.response.Py42Response

get_matter_by_uid(legal_hold_uid)

Gets a single Legal Hold Matter.

Parameters

legal_hold_uid (str) – The identifier of the Legal Hold Matter.

Returns

A response containing the Matter.

Return type

py42.response.Py42Response

get_matters_page(page_num, creator_user_uid=None, active=True, name=None, hold_ext_ref=None, page_size=None)

Gets a page of existing Legal Hold Matters.

Parameters
  • page_num (int) – The page number to request.

  • creator_user_uid (str, optional) – Find Matters by the identifier of the user who created them. Defaults to None.

  • active (bool or None, optional) – Find Matters by their active state. True returns active Matters, False returns inactive Matters, None returns all Matters regardless of state. Defaults to True.

  • name (str, optional) – Find Matters with a ‘name’ that either equals or contains this value. Defaults to None.

  • hold_ext_ref (str, optional) – Find Matters having a matching external reference field. Defaults to None.

  • page_size (int, optional) – The number of legal hold items to return per page. Defaults to py42.settings.items_per_page.

Return type

py42.response.Py42Response

get_policy_by_uid(legal_hold_policy_uid)

Gets a single Preservation Policy.

Parameters

legal_hold_policy_uid (str) – The identifier of the Preservation Policy.

Returns

A response containing the Policy.

Return type

py42.response.Py42Response

get_policy_list()

Gets a list of existing Preservation Policies.

Returns

A response containing the list of Policies.

Return type

py42.response.Py42Response

reactivate_matter(legal_hold_uid)

Reactivates and re-opens a closed Matter.

Parameters

legal_hold_uid (str) – The identifier of the Legal Hold Matter.

Returns

py42.response.Py42Response

remove_from_matter(legal_hold_membership_uid)

Remove a user (Custodian) from a Legal Hold Matter.

Parameters

legal_hold_membership_uid (str) – The identifier of the LegalHoldMembership representing the Custodian to Matter relationship.

Returns

py42.response.Py42Response

Previous Next

© Copyright 2022, Code42 Software. Revision 8bbdc01c.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
stable
v1.26.0
v1.25.1
v1.25.0
v1.24.0
v1.23.0
v1.22.0
v1.21.0
v1.20.0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.18.1
v1.18.0
v1.17.0
v1.16.1
v1.16.0
v1.15.1
v1.15.0
v1.14.2
v1.14.1
v1.14.0
v1.13.0
v1.11.1
v1.11.0
v1.10.1
v1.10.0
v1.9.0
v1.8.2
v1.8.1
v1.8.0
v1.7.1
v1.7.0
v1.6.2
v1.6.1
v1.6.0
v1.5.1
v1.5.0
v1.4.0
v1.3.0
v1.2.0
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.1
v1.0.0
v0.9.0
v0.8.1
v0.8
v0.7.0
chore-move-enums
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds