N
N
Nikolay Baranenko2017-12-07 10:58:02
Python
Nikolay Baranenko, 2017-12-07 10:58:02

What would be the correct json REST API request to get the HOST list by group name?

Hello.
you need to get a list of hosts on monitoring in Zabbix
found this json by group id in zabbix

zabbix_get= \
        {
            "jsonrpc": "2.0",
            "method": "host.get",
            "params": {
                "output": ["host"],
                "groupids": ["1945"],
            },
            "auth": authToken.get("result"),
            "id": authToken.get("id")
        }

returns normally a list of hosts, BUT
there was a desire to give the group name as an input, for example "Group1"
How will the JSON request look like?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question