I´m trying to update the "community' of all the hosts I currently have.
Is there anyway to update it from the API ?
Code:
for host in zapi.host.get():
if "02 - " in host["host"]:
zapi.host.update({
"hostid": host["hostid"],
"interfaces": [{
"details": {
"community": "test",
}
}],
})