agent_groups¶
The following methods allow for interaction with the ZMS Agent Groups API endpoints.
Methods are accessible via zms.agent_groups
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 AgentGroupsAPI¶
Bases:
APIClientA Client object for the ZMS Agent Groups domain.
Provides access to agent group operations including: - List agent groups with pagination, search, and sorting - Get agent group TOTP secrets
- get_agent_group_totp_secrets(customer_id, eyez_id)¶
Get TOTP secrets for a specific agent group.
- Parameters:
customer_id – The customer ID.
eyez_id – The agent group eyez ID.
- Returns:
(totp_secrets dict, response, error)
- Return type:
Examples
Get TOTP secrets:
>>> result, _, err = client.zms.agent_groups.get_agent_group_totp_secrets( ... customer_id="123456789", ... eyez_id="abc-def-123" ... ) >>> if err: ... print(err) >>> print(result.get("totpSecret"))
- list_agent_groups(customer_id, page=1, page_size=20, search=None, sort=None, sort_dir=None)¶
Get a paginated list of agent groups for a customer.
- Parameters:
customer_id – The customer ID.
page – Page number (default 1).
page_size – Number of items per page (default 20).
search – Search filter string.
sort – Sort field.
sort_dir – Sort direction (ASC or DESC).
- Returns:
(agent_groups_connection dict, response, error)
- Return type:
Examples
List agent groups:
>>> result, _, err = client.zms.agent_groups.list_agent_groups( ... customer_id="123456789" ... ) >>> if err: ... print(err) >>> for group in result.get("nodes", []): ... print(group.get("name"))