As the name suggests, I am trying to apply 3 standard templates to one server through the API.
I see where I can clear specific templates, and add one template in the documentation, but is it possible to add more than template to a host?
I tried both of these:
{ "jsonrpc": "2.0", "method": "host.update", "params": { "hostid": "HOSTID", "templates": [ { "templateid": "13845", "templateid": "10001", "templateid": "10050" } ] },
{ "jsonrpc": "2.0", "method": "template.massadd", "params": { "hosts": [ { "hostid": "13844" } ], "templates": [ { "templateid": "13845", "templateid": "10001", "templateid": "10050" } ] },
Both did the same thing, removed all templates and added just one of the templates to the server.
Any help would be greatly appreciated, I have searched the documentation and the internet and couldn't find any solution.
I see where I can clear specific templates, and add one template in the documentation, but is it possible to add more than template to a host?
I tried both of these:
{ "jsonrpc": "2.0", "method": "host.update", "params": { "hostid": "HOSTID", "templates": [ { "templateid": "13845", "templateid": "10001", "templateid": "10050" } ] },
{ "jsonrpc": "2.0", "method": "template.massadd", "params": { "hosts": [ { "hostid": "13844" } ], "templates": [ { "templateid": "13845", "templateid": "10001", "templateid": "10050" } ] },
Both did the same thing, removed all templates and added just one of the templates to the server.
Any help would be greatly appreciated, I have searched the documentation and the internet and couldn't find any solution.
Comment