admin#

The following methods allow for interaction with the ZDX Admin API endpoints.

Methods are accessible via zdx.admin

class AdminAPI#
list_departments(**kwargs)#

Returns a list of departments that are configured within ZDX.

Keyword Arguments:
  • since (int) – The number of hours to look back for devices.

  • search (str) – The search string to filter by name or department ID.

Returns:

The list of departments in ZDX.

Return type:

BoxList

Examples

List all departments in ZDX for the past 2 hours:

>>> for department in zdx.admin.list_departments():
...     print(department)
list_geolocations(**kwargs)#

Returns a list of all active geolocations configured within the ZDX tenant.

Keyword Arguments:
  • since (int) – The number of hours to look back for devices.

  • location_id (str) – The unique ID for the location.

  • parent_geo_id (str) – The unique ID for the parent geolocation.

  • search (str) – The search string to filter by name.

Returns:

The list of geolocations in ZDX.

Return type:

BoxList

Examples

List all geolocations in ZDX for the past 2 hours:

>>> for geolocation in zdx.admin.list_geolocations():
...     print(geolocation)
list_locations(**kwargs)#

Returns a list of locations that are configured within ZDX.

Keyword Arguments:
  • since (int) – The number of hours to look back for devices.

  • search (str) – The search string to filter by name or location ID.

Returns:

The list of locations in ZDX.

Return type:

BoxList

Examples

List all locations in ZDX for the past 2 hours:

>>> for location in zdx.admin.list_locations():
...     print(location)