users#

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

Methods are accessible via zdx.users

class UsersAPI#
get_user(user_id, **kwargs)#

Returns information on the specified user configured within the ZDX tenant.

Parameters:

user_id (str) – The unique ID for the ZDX user.

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

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

  • department_id (str) – The unique ID for the department.

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

Returns:

The user information.

Return type:

Box

Examples

Return information on the user with the ID of 999999999:

>>> zia.users.get_user(user_id='999999999')
list_users(**kwargs)#

Returns a list of all active users 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.

  • department_id (str) – The unique ID for the department.

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

Returns:

The list of users in ZDX.

Return type:

BoxList

Examples

List all users in ZDX for the past 2 hours:

>>> for user in zdx.users.list_users():
...     print(user)