host.create api perl

XMLWordPrintable

    • Type: Incident report
    • Resolution: Duplicate
    • Priority: Critical
    • None
    • Affects Version/s: 2.0.5
    • Component/s: API (A)
    • Environment:
      ubuntu 12.04

      trying to create host by api
      $json = {
      jsonrpc => '2.0',
      method => 'host.create',
      params => {
      host => 'test_from_api',
      output => 'extend',
      interfaces =>

      { dns => '', hostid => '25', ip => '127.0.0.1', main => '1', port => '10050', type => '1', useip => '1', }

      ,
      groups =>

      { groupid => '2', }

      ,
      },
      auth => "$authID",
      id => '21',
      };
      all ok.. but if change groupid to 11 or 12 or 23 or 34 etc.. (2 digits)
      have this answer
      "code":-32500,"message":"Application error.","data":"No permissions to referred object or it does not exist!"

            Assignee:
            Unassigned
            Reporter:
            Bogdan Lobachevsky
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: