Hi ,
I am trying to update the existing host by linking the existing template but seems im not using the right api. Can some one please help with this
I am using curl with as below
curl --header "Content-Type: application/json" --request POST --data '
{
"jsonrpc": "2.0",
"method": "host.update",
"params": {
"hostid": "10325",
"templates": [
{
"templateid": "10284"
}
]
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}' "http://127.0.0.1/zabbix/api_jsonrpc.php"
I have even tried mass update but still no luck,
curl --header "Content-Type: application/json" --request POST --data '{
"jsonrpc": "2.0",
"method": "template.massadd",
"params": {
"templates": [
{
"templateid": "10284"
}
],
"hosts": [
{
"hostid": "10325"
},
{
"hostid": "10326"
}
, "auth": "76a7a5e3c03e3867df510e743e4c80eb", "id": 1}' http://127.0.0.1/zabbix/api_jsonrpc.php"
any pointers?
Thanks in advance
I am trying to update the existing host by linking the existing template but seems im not using the right api. Can some one please help with this
I am using curl with as below
curl --header "Content-Type: application/json" --request POST --data '
{
"jsonrpc": "2.0",
"method": "host.update",
"params": {
"hostid": "10325",
"templates": [
{
"templateid": "10284"
}
]
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}' "http://127.0.0.1/zabbix/api_jsonrpc.php"
I have even tried mass update but still no luck,
curl --header "Content-Type: application/json" --request POST --data '{
"jsonrpc": "2.0",
"method": "template.massadd",
"params": {
"templates": [
{
"templateid": "10284"
}
],
"hosts": [
{
"hostid": "10325"
},
{
"hostid": "10326"
}
, "auth": "76a7a5e3c03e3867df510e743e4c80eb", "id": 1}' http://127.0.0.1/zabbix/api_jsonrpc.php"
any pointers?
Thanks in advance
Comment