-
Incident report
-
Resolution: Won't fix
-
Trivial
-
None
-
None
-
None
-
zabbix 2.0.9
Hi
I'm using zabbix API for dynamic adjusting configuration on automatic deployments. I wrote a script, that generates an xml with configuration (it's a valid xml, I'm able to import it manually) but when trying to upload it using API I face with unexpected problem.
With the following command
import=`curl -s POST -H 'Content-Type: application/json-rpc' -d \
"{\
\"jsonrpc\":\"2.0\",\
\"method\":\"configuration.import\",\
\"params\":{\"format\":\"xml\",\"rules\":{\
\"templates\":
,\
\"items\":{\"createMissing\": true,\"updateExisting\":true}},\
\"source\": @template.xml)},\"auth\":\"$AUTH_TOKEN\",\"id\":12 1}" $API`
I get
{"jsonrpc":"2.0","error":
,"id":null}
JSON seems to be valid - if I use some inline xml instead of @template.xml it works greate, but I can't use it for half-megabyte xml.