customer_data_handling

The following methods allow for interaction with the ZCell Customer Data Handling API endpoints. Includes retrieving and updating the data-handling configuration for a customer.

Methods are accessible via zcell.customer_data_handling

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 CustomerDataHandlingAPI

Bases: APIClient

get_customer_data_handling(id=None)

Gets the customer data from the DB for the logged-in customer.

Parameters:

id (str) – Optional. The ZCell customer ID. Defaults to the zcellCustomerId config value or the ZCELL_CUSTOMER_ID environment variable when omitted.

Returns:

(result, Response, error)

Return type:

tuple

Examples

Fetch the logged-in customer’s data:

>>> customer_data, _, err = client.zcell.customer_data_handling.get_customer_data_handling(
...     id='gi754cvqb07r0',
... )
>>> if err:
...     print(f"Error fetching customer data: {err}")
...     return
>>> print(f"Customer data fetched successfully: {customer_data.as_dict()}")
update_customer_data_handling(id=None, **kwargs)

Activate end customer.

Parameters:
  • id (str) – Optional. The ZCell customer ID. Defaults to the zcellCustomerId config value or the ZCELL_CUSTOMER_ID environment variable when omitted.

  • **kwargs

    Request body fields (all required).

    username (str): The activation username.

    password (str): The activation password.

    api_key (str): The activation API key.

Returns:

(result, Response, error)

Return type:

tuple

Examples

Activate an end customer:

>>> result, _, error = client.zcell.customer_data_handling.update_customer_data_handling(
...     id='gi754cvqb07r0',
...     username='deploy@cellular-beta-two.zsloginbeta.net',
...     password='********',
...     api_key='********',
... )
>>> if error:
...     print(f"Error activating customer: {error}")
...     return
>>> print(f"Customer activated successfully: {result.as_dict()}")