Hi everyone,
i am new to Zabbix.I recently started working with zabbix API. i am stuck at one point.
i am trying to link multiple templates with one host which is created(host) using zabbix api. i don't know i am going wrong.
Here is the jason:
"jsonrpc":"2.0",
"method":"host.create",
"params":{
"host":"srv-test-t005",
"ip":"192.168.3.1",
"port":10050,
"useip":1,
"groups":[
],
"templates":[
,
{ "templateid":10049 } ]
},
"auth":'.$res['result'].',
"id":1
}';
which gives me an error: "Invalid JSON. An error occurred on the server while parsing the JSON text."
Can you please guide me?
Another thing i noticed that when i use php fuction json_decode() with above json the last templateid"10049 is gone in the php arrary. may be because of duplicate "templateid" entry.