Ad Widget

Collapse

Error in API host.create()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phl4kx
    Junior Member
    • May 2010
    • 8

    #1

    Error in API host.create()

    Hi friends, Im using Zabbix 1.9.8 download from zabbix web page, Im developed my own API frontend, all other calls to API are ok but I have this error when I use host.create() method:

    Array ( [jsonrpc] => 2.0 [error] => Array ( [code] => -32500 [message] => Application error. [data] => No permissions to referred object or it does not exist! ) [id] => 20

    I can create hostgroups but I cant create Host, Im using Admin user

    here is the PHP code:

    PHP Code:
    //CREAR HOST
            
    $host Windows001;
            
    $data = array (
                   
    'jsonrpc' => '2.0',
                
    'method' => 'host.create',
                
    'params' => array ('host' => $host,'interfaces' => array ('type' => 1,'useip' => 1'ip' => '192.168.3.1''port' => 10050'status' => 1),'groups' => array ('groupid' => 40),'templates' => array ('templateid' => 10002)),
                
    'auth' => $auth,
                
    'id' => 20
                
    );
            
    $data consultar_zabbix($data);
            
    print_r($data)."<br>"
    please some help, thanks
  • marcherren
    Junior Member
    • Mar 2011
    • 28

    #2
    Facing the same problem, have you found a solution to it?

    Comment

    • LeoCombes
      Member
      • Mar 2011
      • 32

      #3
      Originally posted by marcherren
      Facing the same problem, have you found a solution to it?
      same for me...

      Comment

      • marcherren
        Junior Member
        • Mar 2011
        • 28

        #4
        Have a look at ZBX-5209

        Comment

        Working...