I'm new to API and I'm trying to figure out how to get latest problems using API. Can anyone help with this?
curl -i -X POST -H 'Content-Type: application/json' -d '
{
"jsonrpc": "2.0",
"method": "trigger.get",
"params": {
"filter": {"value": "1"},
"sortfield": "lastchange"
"limit": 20
},
"auth": "as;lkjda;ldsjalkjda;",
"id": 1
}' http://127.0.0.1/zabbix/api_jsonrpc.php
but I get the following error:
{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error","data":"Invalid JSON. An error occurred on the server while parsing the JSON text."},"id":null}
curl -i -X POST -H 'Content-Type: application/json' -d '
{
"jsonrpc": "2.0",
"method": "trigger.get",
"params": {
"filter": {"value": "1"},
"sortfield": "lastchange"
"limit": 20
},
"auth": "as;lkjda;ldsjalkjda;",
"id": 1
}' http://127.0.0.1/zabbix/api_jsonrpc.php
but I get the following error:
{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error","data":"Invalid JSON. An error occurred on the server while parsing the JSON text."},"id":null}

Comment