Hi everyone,
I'm trying to get the hosts from a hostgroup with the api. I've been looking at host.get and if you scroll down to the examples in the documentation then the second example should give me the groups but it doesn't.
I used that exact example without the filter even but no groups are shown. All the other information of the host is shown perfectly in json but the "groups" part is completely missing.
Then there's also hostgroup.get where selectHosts should give me the hosts in the group if I understand it correctly but that doesn't work either. I might be using that incorrectly though. Here's the params part I send:
Can anyone give me a few pointers on what I might be doing wrong?
I'm trying to get the hosts from a hostgroup with the api. I've been looking at host.get and if you scroll down to the examples in the documentation then the second example should give me the groups but it doesn't.
I used that exact example without the filter even but no groups are shown. All the other information of the host is shown perfectly in json but the "groups" part is completely missing.
Then there's also hostgroup.get where selectHosts should give me the hosts in the group if I understand it correctly but that doesn't work either. I might be using that incorrectly though. Here's the params part I send:
Code:
"params":
{
"output": ["name", "id"],
"selectHosts": "extend",
},