Hi,
I'm using Zabbix 1.8.4, and I have an external application doing some requests through the JSON API. I'm trying to use user.logout to destroy the sessions I won't use any more, but since the docs are incomplete I can't find any reference of this operation, and there seems to be a bug in it.
First, I tried this:
Zabbix request:
Zabbix response:
Investigating a bit, I figured out that api/classes/class.cuser.php was trying to run this query in the function logout:
I guessed that the sessionid should not be passed inside an array, so I tried this:
Zabbix request:
Zabbix response:
As you can see, the API prevents me to run this request because 'params' is not an array, but cuser::logout expects the parameter to be a single string.
Has anybody used user.logout sucessfully? Should I report this behaviour as a bug?
I'm using Zabbix 1.8.4, and I have an external application doing some requests through the JSON API. I'm trying to use user.logout to destroy the sessions I won't use any more, but since the docs are incomplete I can't find any reference of this operation, and there seems to be a bug in it.
First, I tried this:
Zabbix request:
Code:
{
"id":0,
"auth":"14e669ba7c278c44678cbcbcb97c442d",
"jsonrpc":"2.0",
"method":"user.logout",
"params":["14e669ba7c278c44678cbcbcb97c442d"]
}
Code:
{
"jsonrpc":"2.0",
"error":{
"code":-32400,
"message":"System error.","data":"JSON-rpc error generation failed. No such error: "
},
"id":0
}
Code:
SELECT s.*
FROM sessions s
WHERE s.sessionid=Array
AND s.status=0
AND ((s.userid BETWEEN 000000000000000 AND 099999999999999))
Zabbix request:
Code:
{
"id":0,
"auth":"14e669ba7c278c44678cbcbcb97c442d",
"jsonrpc":"2.0",
"method":"user.logout",
"params":"14e669ba7c278c44678cbcbcb97c442d"
}
Code:
{
"jsonrpc":"2.0",
"error":{
"code":-32602,
"message":"Invalid params.","data":"JSON-rpc params is not an Array."},
"id":0
}
Has anybody used user.logout sucessfully? Should I report this behaviour as a bug?
.
Comment