Releases: code42/py42
v0.8.1
0.8.1 - 2020-04-16
Changed
sdk.detectionlistsmethod renames:create()->create_user()get()->get_user()get_by_id()->get_user_by_id()update_notes()->update_user_notes()add_risk_tag()->add_user_risk_tags()remove_risk_tag()->remove_user_risk_tags()add_cloud_alias()->add_user_cloud_aliases()remove_cloud_alias()->remove_user_cloud_aliases()
v0.8
0.8.0 - 2020-04-15
Added
-
sdk.detectionlistsmethods:update_notes()remove_risk_tag()add_risk_tag()add_cloud_alias()remove_cloud_alias()create()get()get_by_id()
-
sdk.detectionlists.high_risk_employeemethods:add()remove()get()search()set_alerts_enabled()
v0.7.0
0.7.0 - 2020-04-10
Removed
- Parameter
classificationremoved fromOrgClient.create_org() - Parameter
legal_hold_membership_uidremoved fromLegalHoldClient.get_all_matter_custodians() - Removed
ArchiveClient. UseArchiveModule. - Removed function
ArchiveModule.get_data_key_token(). - Removed function
ArchiveModule.get_web_restore_info(). - Parameter
classificationremoved fromOrgClient.create_org(). - Parameter
legal_hold_membership_uidremoved fromLegalHoldClient.get_all_matter_custodians(). - Removed
SecurityClient. UseSecurityModule.
Changed
- Parameter
active_statewas renamed toactiveand now accepts (True, False, or None)
instead of ("ACTIVE", "INACTIVE", or "ALL") on the followingLegalHoldClientmethods:get_all_matters()get_all_matter_custodians()
- Parameter
storageaccesswas removed fromSDKClient. To restore files, just use
SDKClient.archive.stream_from_backup(). - Parameter
active_statewas renamed toactiveand now accepts (True, False, or None)
instead of ("ACTIVE", "INACTIVE", or "ALL") on the followingLegalHoldClientmethods:get_all_matters()get_all_matter_custodians()
py42.sdk.archive.stream_from_backup()now raisesPy42ArchiveFileNotFoundErrorwhen it does not find a file.py42.sdk.alertsandpy42.sdk.detectionlistsraisePy42SessionInitializationErrorif they are unable to
connect to the necessary microservice andPy42FeatureUnavailableErrorif their environment does not support
the microservice.py42.sdk.securitydata.get_security_plan_storage_info_list()raisesPy42SecurityPlanConnectionErrorif it can't
connect to get plan info.- Storage node connection issues may raise
Py42StorageSessionInitializationError. - All requests may raise a subclass of
Py42HTTPErrordenoting which type of HTTP error it is:Py42BadRequestErrorPy42UnauthorizedErrorPy42ForbiddenErrorPy42NotFoundErrorPy42InternalServerError
py42.modules.ArchiveModulemethods:get_all_device_restore_history()(formerlyget_restore_history_by_device_id())get_all_user_restore_history()(formerlyget_restore_history_by_user_id())get_all_org_restore_history()(formerlyget_restore_history_by_org_id())
now all return generator objects that handle paging through restore history.
- Renamed
AlertClient.get_query_details()toAlertClient.get_details(). - Renamed
SecurityModule.get_plan_security_events()toget_all_plan_security_events(). - Renamed
SecurityModule.get_user_security_events()toget_all_user_security_events().
Added
- py42 specific exceptions at new module
py42.sdk.exceptions:Py42ErrorPy42ArchiveFileNotFoundErrorPy42SessionInitializationErrorPy42FeatureUnavailableErrorPy42SecurityPlanConnectionErrorPy42HTTPErrorPy42BadRequestErrorPy42UnauthorizedErrorPy42ForbiddenErrorPy42NotFoundErrorPy42InternalServerError
- Parameters
archive_passwordandencryption_keyadded toArchiveModule.stream_from_backup().
v0.6.1
v0.6.0
0.6.0 - 2020-03-16
Removed
-
The following methods from
py42.util:get_obj_from_response()filter_out_none()print_dict()
-
py42.debugmodule. Usepy42.settings.debuginstead. -
py42.utilmodule. Usepy42.sdk.utilinstead. -
ArchiveModule.download_from_backup(). UseArchiveModule.stream_from_backup()instead.
Changed
All client methods now return a Py42Response object that simplifies accessing the most meaningful parts
of the returned JSON object.
Renamed methods to reduce redundancy:
-
SDK>SDKClientcreate_using_local_account()>from_local_account()administration>serveradminlegal_hold>legalholdstorage>storageacesssecurity>securitydatauser_context>usercontextemployee_case_management>detectionlists
-
StorageClientFactoryget_storage_client_from_device_guid()>from_device_guid()get_storage_client_from_plan_uid()>from_plan_info()
-
StorageClientsecurity>securitydata
-
StorageSecurityClientget_security_detection_events_for_plan()>get_plan_security_events()get_security_detection_events_for_user()>get_user_security_events()
-
FileEventClientsearch_file_events()>search()
-
StorageArchiveClientsearch_archive()>search()get_archive_tree_node()>get_file_path_metadata()create_web_restore_session()>create_restore_session()submit_web_restore_job()>start_restore()get_web_restore_job()>get_restore_status()cancel_web_restore_job()>cancel_restore()get_web_restore_job_result()>stream_restore_result()
-
DepartingEmployeeClientcreate_departing_employee()>create()resolve_departing_employee()>resolve()get_all_departing_employees()>get_all()get_case_by_username()>get_by_username()get_case_by_id()>get_by_id()update_case()>update()
-
LegalHoldClientcreate_legal_hold()>create_matter()get_legal_hold_policy_by_uid()>get_policy_by_uid()get_all_legal_hold_policies()>get_all_policies()get_legal_hold_by_uid()>get_matter_by_uid()get_legal_holds()>get_all_matters()get_legal_hold_memberships()>get_all_matter_custodians()add_user_to_legal_hold()>add_to_matter()remove_user_from_legal_hold()>remove_from_matter()deactivate_legal_hold()>deactivate_matter()reactivate_legal_hold()>reactivate_matter()create_legal_hold_policy()>create_policy()create_legal_hold()>create_matter()
-
AlertClientsearch_alerts()>search()resolve_alert()>resolve()reopen_alert()>reopen()
-
OrgClientget_orgs()>get_all()get_org_by_id()>get_by_id()get_org_by_uid()>get_by_uid()block_org()>block()unblock_org()>unblock()deactivate_org()>deactivate()reactivate_org()>reactivate()get_current_user_org>get_current
-
UserClientget_user_by_id()>get_by_id()get_user_by_uid()>get_by_uid()get_user_by_username()>get_by_username()get_current_user()>get_current()get_users()>get_all()block_user()>block()unblock_user()>unblock()deactivate_user()>deactivate()reactivate_user()>reactivate()change_user_org_assignment()>change_org_assignment()
-
DeviceClientget_device_by_id()>get_by_id()get_device_by_guid()>get_by_guid()get_devices()>get_all()block_device()>block()unblock_device()>unblock()deactivate_device()>deactivate()reactivate_device()>reactivate()deauthorize_device()>deauthorize()get_device_settings()>get_settings()
v0.5.1
v0.5.0
v0.4.4
0.4.4 - 2020-02-24
Changed
py42.settings.items_per_pageno long affectsDepartingEmployeeClient.get_all_departing_employees(), which is now always set at 100 items per page.FileEventQueryandAlertQueryobjects will now return up to 10,000 results by default (the previous default value was 100).
Fixed
- Issue where
DepartingEmployeeClient.get_all_departing_employees()always resulted in a 400 status code.
v0.4.3
0.4.3 - 2020-02-21
Added
py42.settings.items_per_page. This effectively replacespage_sizefor the methods that were changed below.
Changed
The following resources no longer accept page_num and page_size parameters and no longer return a
requests.Response object:
UserClient.get_users()DeviceClient.get_devices()OrgClient.get_orgs()LegalHoldClient.get_legal_holds()LegalHoldClient.get_legal_hold_memberships()DepartingEmployeeClient.get_all_departing_employees()
They instead return a generator object that is iterated over to retrieve all the pages, eliminating the need to
manually compose loops to retrieve each page. For example, the below snippet will retrieve all pages of users:
for page in users.get_users():
user_list = json.loads(page.text)["data"]["users"]