Ad Widget

Collapse

API problems with GET method in Zabbix 2.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xaaru
    Junior Member
    • May 2012
    • 12

    #1

    API problems with GET method in Zabbix 2.0

    Hi, dudes!
    i've got installed Zabbix 2.0 on clean server. And have got some troubles with GET method:

    Code:
    Query
    {
    "auth":null,
    "method":"user.authenticate",
    "id":1,
    "params":{
    "password":"ZabApi123",
    "user":"apiuser"
    },"
    jsonrpc":"2.0"
    }
    
    Response
    {
    "jsonrpc":"2.0",
    "result":"67d99b61d939bcbd334b4d926ca21935",
    "id":1
    }
    
    Query
    {
    "auth":"67d99b61d939bcbd334b4d926ca21935",
    "method":"host.get",
    "id":1,
    "params":{
    "output":"extend"
    },
    "jsonrpc":"2.0"
    }
    Response:
    {
    "jsonrpc":"2.0",
    "result":[],
    "id":1
    }
    "result":[], - is empty

    but if i try to ask API version:
    Code:
    Query
    {
    "auth":null,
    "method":"user.authenticate",
    "id":1,
    "params":{
    "password":"ZabApi123",
    "user":"apiuser"
    },
    "jsonrpc":"2.0"
    }
    
    
    Response
    {
    "jsonrpc":"2.0",
    "result":"f8351c1f68f921f7e238a78b4cbddecc",
    "id":1
    }
    
    Query
    {
    "auth":"f8351c1f68f921f7e238a78b4cbddecc",
    "method":"apiinfo.version",
    "id":1,
    "params":[],
    "jsonrpc":"2.0"
    }
    
    Response
    {
    "jsonrpc":"2.0",
    "result":"1.4",
    "id":1
    }
    "result":"1.4", - It works

    Have you got any ideas?
    Thanks
  • xaaru
    Junior Member
    • May 2012
    • 12

    #2
    Fixed
    User didn't have permissions to hosts

    Comment

    Working...