Is it possible to unlink and clear template from host through API request? (like button "Unlink and clear" in host configuration)
I found option "templates_clear" for "method":"template.update" and example with this option, but it's don't work for me: new template was linked to host, but old template was not unlink and not cleared.
I found option "templates_clear" for "method":"template.update" and example with this option, but it's don't work for me: new template was linked to host, but old template was not unlink and not cleared.
Code:
"jsonrpc":"2.0",
"method":"template.update",
"params":{
"templateid": "10159",
"hosts": [ {"hostid": "10158"} ],
"templates_clear": [{"templateid": "10157"}]
Comment