Ad Widget

Collapse

zabbix event.get call

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hound
    Junior Member
    • Aug 2015
    • 9

    #1

    zabbix event.get call

    I am trying to get all the events listed for a particular time period using zabbix API through postman.

    I am using username/password for basic authentication along with URL https://zabbix.hp8.us/zabbix/api_jsonrpc.php. Below JSON is my request body. One thing I am not getting is the auth: <> and id: <> in the below JSON, how can I generate the auth:<> value? . If I omit those values, my POST call will return me a [] array. What am i doing wrong here ?

    {
    "jsonrpc": "2.0",
    "method": "event.get",
    "params": {
    "output": "extend",
    "time_from": "1442723590",
    "time_till": "1442809990",
    "sortfield": ["clock", "eventid"],
    "sortorder": "desc"
    },
    "auth": "038e1d7b1735c6a5436ee9eae095879e",
    "id": 1
    }
  • hound
    Junior Member
    • Aug 2015
    • 9

    #2
    I got the answer for this. I just had to generate a auth using below JSON first, then use the POST call with other JSON
    {
    "jsonrpc": "2.0",
    "method": "user.login",
    "params": {
    "user": "",
    "password": ""
    },
    "id" : 1

    Comment

    Working...