M
M
may-cat2015-08-27 16:08:24
Monitoring
may-cat, 2015-08-27 16:08:24

What is wrong in the request to zabbix?

I make a request through the zabbix api:


{
"jsonrpc": "2.0",
"auth": "8208fce965ec4a1ce2570d0027a5db77",
"method": "httptest.create",
"params": {
"name": "Homepage check",
"hostid": "10084",
" steps": [
{
"name": "Homepage",
"url": " mycompany.com ",
"status_codes": 200,
"no": 1
},
{
"name": "Homepage / About",
"url": " mycompany.com/about ",
"status_codes": 200,
"no": 2
}
]
},
}

He returns
{
"jsonrpc": "2.0",
"error": {
"code": -32600,
"message": "Invalid Request.",
"data": "JSON-rpc version is not specified."
},
"id": null
}

Authorization key is correct, hostide, application ID are correct.
Everything according to the documentation . What am I doing wrong, where to dig?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
may-cat, 2015-09-01
@may-cat

The correct answer is two extra commas

P
Puma Thailand, 2015-08-27
@opium

do you specify content type?
POST -H 'Content-Type: application/json-rpc'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question