lookalikedomains

The following methods allow for interaction with the ZEASM LookALike Domains API endpoints.

Methods are accessible via zscaler.zeasm.lookalike_domains

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 LookALikeDomainsAPI

Bases: APIClient

A Client object for the ZEASM Lookalike Domains resource.

This class provides methods to interact with ZEASM lookalike domains, allowing you to retrieve and manage lookalike domains detected for an organization’s assets.

get_lookalike_domain(org_id, lookalike_raw)

Retrieves details for a lookalike domain based on the specified domain name.

Parameters:
  • org_id (str) – The unique identifier for the organization.

  • lookalike_raw (str) – The lookalike domain name (e.g., “assuredartners.com”).

Returns:

A tuple containing:
  • LookalikeDomainDetails: Object containing the domain details

  • Response: The raw API response object

  • error: Any error that occurred, or None if successful

Return type:

tuple

Examples

Get details for a specific lookalike domain:

>>> domain, _, err = client.zeasm.lookalike_domains.get_lookalike_domain(
...     org_id="3f61a446-1a0d-11f0-94e8-8a5f4d45e80c",
...     lookalike_raw="assuredartners.com"
... )
>>> if err:
...     print(f"Error: {err}")
...     return
>>> print(domain.as_dict())
list_lookalike_domains(org_id)

Retrieves the list of lookalike domains for an organization.

Parameters:

org_id (str) – The unique identifier for the organization.

Returns:

A tuple containing:
  • LookALikeDomains: Object containing results list and total_results count

  • Response: The raw API response object

  • error: Any error that occurred, or None if successful

Return type:

tuple

Examples

List all lookalike domains for an organization:

>>> domains, _, err = client.zeasm.lookalike_domains.list_lookalike_domains(
...     org_id="3f61a446-1a0d-11f0-94e8-8a5f4d45e80c"
... )
>>> if err:
...     print(f"Error: {err}")
...     return
>>> if domain:
...     print(domain.as_dict())