I have Zabbix 3.2.
I want to get HOST List via API by search Group
I found and checked variant by GroupID For example:
zabbix_get= \
{
"jsonrpc": "2.0",
"method": "host.get",
"params": {
"output": ["host"],
"groupids": ["1945"],
},
"auth": authToken.get("result"),
"id": authToken.get("id")
}
Is it possible to search by group name, for example name "Group1"?
While you cannot filter for group membership in host.get
, you could use hostgroup.get with the selectHosts
parameter.