I'm using the Zabbix API a lot to setup systems in a fully automated way.
In Zabbix 5.4 I'm using the API to link a template to a host via template.massadd. There I'm stating the templateid and the hostid:
{
"jsonrpc": "2.0",
"method": "template.massadd",
"params": {
"templates": [
{
"templateid": "${templateid}"
}
],
"hosts": [
{
"hostid": "${hostid}"
}
]
},
"id": 1,
"auth": "${auth}"
}
That hosts parameter is not available anymore in Zabbix 6.0 API (ZBXNEXT-6867 template.create, template.update, template.massadd, template.massupdate: dropped support of parameter hosts.).
What is the proper way to link an additional template to a host in Zabbbix 6.0 API ?
There is an option via host.update to state a template ID to link a template. But all existing linked templates are removed.
So that's not a valid option.
In Zabbix 5.4 I'm using the API to link a template to a host via template.massadd. There I'm stating the templateid and the hostid:
{
"jsonrpc": "2.0",
"method": "template.massadd",
"params": {
"templates": [
{
"templateid": "${templateid}"
}
],
"hosts": [
{
"hostid": "${hostid}"
}
]
},
"id": 1,
"auth": "${auth}"
}
That hosts parameter is not available anymore in Zabbix 6.0 API (ZBXNEXT-6867 template.create, template.update, template.massadd, template.massupdate: dropped support of parameter hosts.).
What is the proper way to link an additional template to a host in Zabbbix 6.0 API ?
There is an option via host.update to state a template ID to link a template. But all existing linked templates are removed.
So that's not a valid option.
Comment