device_management#
The following methods allow for interaction with the ZIA Device Management API endpoints.
Methods are accessible via zia.device_management
- class DeviceManagementAPI#
Bases:
object
- list_device_groups(query=None)#
Returns the list of ZIA Device Groups.
- Parameters:
query (str) – A search string used to match against a Device Group’s name or description attributes.
- Returns:
A list containing ZIA Device Groups.
- Return type:
BoxList
Examples
Print all device groups
>>> for device group in zia.device_groups.list_device_groups(): ... pprint(device)
Print Device Groups that match the name or description ‘Windows’
>>> pprint(zia.device_groups.list_device_groups('Windows'))
- list_device_lite()#
Returns the list of devices that includes device ID, name, and owner name.
- Returns:
List of Device/ids.
- Return type:
BoxList
Examples
Get Device Lite results
>>> results = zia.device.list_device_lite() ... for item in results: ... print(item)
- list_devices(query=None)#
Returns the list of Devices.
- Parameters:
query (str) – A search string used to match against a Device’s name or description attributes.
- Returns:
A list containing Device.
- Return type:
BoxList
Examples
Print all devices
>>> for dlp idm in zia.device_groups.list_devices(): ... pprint(idm)
Print IDM profiles that match the name or description ‘WINDOWS_OS’
>>> pprint(zia.device_groups.list_devices('WINDOWS_OS'))