Hi,
I'm building a custom web application on top of Zabbix to show logged data in special ways. To access Zabbix, I'm using its JSON API.
In my setup, guest user will have permissions on some data, and I'm trying to retrieve those data through the API, but I don't know exactly how to do that.
If I try to access a resource directly, without specifying auth, I get this:
request:
response:
And if I try to use the login operation with user 'guest' or empty, I get this:
request:
response:
And BTW, the documentation about the login operation of the api (http://www.zabbix.com/documentation/1.8/api/user/login) is empty :S .
Any help would be appreciated. Thank you!
I'm building a custom web application on top of Zabbix to show logged data in special ways. To access Zabbix, I'm using its JSON API.
In my setup, guest user will have permissions on some data, and I'm trying to retrieve those data through the API, but I don't know exactly how to do that.
If I try to access a resource directly, without specifying auth, I get this:
request:
Code:
{
"id":0,
"auth":"",
"jsonrpc":"2.0",
"method":"hostgroup.get",
"params":{"output":"extend"}
}
Code:
{
"jsonrpc":"2.0",
"error":{
"code":-32602,
"message":"Invalid params.",
"data":"Not authorized"
},
"id":0
}
request:
Code:
{
"id":0,
"auth": null,
"jsonrpc":"2.0",
"method":"user.authenticate",
"params":{"user":"guest","password":""}
}
Code:
{
"jsonrpc":"2.0",
"error":{
"code":-32602,
"message":"Invalid params.",
"data":"No API access"
},
"id":0
}
Any help would be appreciated. Thank you!
.
Comment