This is my first time to try the API, and here is the command I tried:
curl -i -X POST -H 'Content-Type:application/json' -d '{"jsonrpc":"2.0","method":"user.login","params":{ "user":"Admin","password":"zabbix"},"auth":null,"i d":0}' http://1.1.1.1/zabbix/api_jsonrpc.php
but this is what got:
HTTP/1.0 412 Precondition Failed
Date: Fri, 08 May 2015 08:36:08 GMT
Server: Apache/2.2.22 (Linux/SUSE)
X-Powered-By: PHP/5.3.17
Content-Length: 0
Connection: close
Content-Type: text/html
As I googled, everyone is saying the key is 'Content-Type:application/json', which I already paid enough attention to.
I am stuck here, and am really puzzled on how to get more information for troubleshooting.
My testing environment: Virutal Appliance v2.2
curl -i -X POST -H 'Content-Type:application/json' -d '{"jsonrpc":"2.0","method":"user.login","params":{ "user":"Admin","password":"zabbix"},"auth":null,"i d":0}' http://1.1.1.1/zabbix/api_jsonrpc.php
but this is what got:
HTTP/1.0 412 Precondition Failed
Date: Fri, 08 May 2015 08:36:08 GMT
Server: Apache/2.2.22 (Linux/SUSE)
X-Powered-By: PHP/5.3.17
Content-Length: 0
Connection: close
Content-Type: text/html
As I googled, everyone is saying the key is 'Content-Type:application/json', which I already paid enough attention to.
I am stuck here, and am really puzzled on how to get more information for troubleshooting.
My testing environment: Virutal Appliance v2.2

Comment