Ad Widget

Collapse

version 5.0 API (hsot.create)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • VojuCZ
    Junior Member
    • Dec 2016
    • 7

    #1

    version 5.0 API (hsot.create)

    Hello,
    can somebody help? I can login, I can send host.get method and everything is OK. But host.create response me with error :
    Code:
    {
     "jsonrpc":"2.0",
     "method":"host.create",
     "params":{
       "host": "10.200.200.6",
       "interfaces": [
        {
         "type":2,
         "main":1,
         "useip": 1,
         "ip": "10.200.200.6",
         "dns":"",
         "port": "161"
        }
       ],
       "groups": [
        {
         "groupid": "25"
        }
       ],
       "templates": [
        {
         "templateid": "10325"
        }
       ]
     },
     "auth":"aede2d39b8772ec317fad1cfbb1b90e6",
     "id":1
    }
    Response:
    Code:
    {"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params.","data":"Incorrect arguments passed to function."},"id":1}
    Can somebody help ? groupid and templateid are correct (.../zabbix/hostgroups.php?form=update&groupid=25 and .../zabbix/templates.php?form=update&templateid=10325 exists). Version 5.0 on Ubuntu 18.04.4
  • Wowa Po
    Junior Member
    • May 2022
    • 1

    #2
    Hey,

    here is the explanation
    here is an example

    Comment

    Working...