web_privacy

The following methods allow for interaction with the ZCC Web Privacy API endpoints.

Methods are accessible via zcc.web_privacy

Copyright (c) 2023, Zscaler Inc.

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

class WebPrivacyAPI

Bases: APIClient

get_web_privacy()

Returns Web Privacy Information from the Client Connector Portal.

Parameters:

N/A

Returns:

Returns Web Privacy Information in the Client Connector Portal.

Return type:

list

Examples

Prints Web Privacy Information in the Client Connector Portal to the console:

>>> web_privacy_info = client.zcc.web_privacy.get_web_privacy()
...    print(web_privacy_info)
set_web_privacy_info(**kwargs)

Adds or updates the configuration information for end user and device-related PII.

Parameters:
  • id (str)

  • active (str)

  • collect_machine_hostname (str)

  • collect_user_info (str)

  • collect_zdx_location (str)

  • disable_crashlytics (str)

  • enable_packet_capture (str)

  • export_logs_for_non_admin (str)

  • grant_access_to_zscaler_log_folder (str)

  • override_t2_protocol_setting (str)

  • restrict_remote_packet_capture (str)

Returns:

A tuple containing the updated Web Privacy Information, response, and error.

Return type:

tuple

Examples

updates the configuration information for end user and device-related PII:

>>> private_info, _, error = client.zcc.web_privacy.set_web_privacy_info(
...     active='1',
...     collect_user_info='1',
...     collect_machine_hostname='1',
...     collect_zdx_location='1',
...     enable_packet_capture='1',
...     disable_crashlytics='1',
...     override_t2_protocol_setting='1',
...     restrict_remote_packet_capture='0',
...     grant_access_to_zscaler_log_folder='0',
...     export_logs_for_non_admin='1',
...     enable_auto_log_snippet='0'
... )
>>> if error:
...     print(f"Error updating web privacy info: {error}")
...     return
... print(f"web Privacy Info updated successfully: {private_info.as_dict()}")