Ad Widget

Collapse

API proxy.create not updating interface values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vienna
    Junior Member
    • Mar 2013
    • 7

    #1

    API proxy.create not updating interface values

    Hi all,

    I got a problem creating a proxy with the api. Here is my json post:

    $VAR1 = '{"auth":"xxxxxx","params":{"interfaces":[{"dns":"","useip":"1","ip":"100.100.100.100","port ":"10051"}],"status":"6","host":"PROXY"},"jsonrpc":"2.0","id" :1,"method":"proxy.create"}';

    Am I doing something wrong? The proxy is created with the correct name (PROXY) but the interface itself has still the IP 127.0.0.1 and the DNS name 'localhost'.

    Looks like the interfaces array is not parsed at all. Changing the port and useip option doesn't lead to success here as well, still the default values are used.

    BR,
    vienna
  • vienna
    Junior Member
    • Mar 2013
    • 7

    #2
    Solved...

    Comment

    • heaje
      Senior Member
      Zabbix Certified Specialist
      • Sep 2009
      • 325

      #3
      Just curious here, but why don't you try to make the call with all the interface parameters outside of an array? I'm thinking something like this:

      $VAR1 = '{"auth":"xxxxxx","params":{"dns":"","useip":"1"," ip":"100.100.100.100","port ":"10051","status":"6","host":"PROXY"},"jsonrpc":" 2.0","id" :1,"method":"proxy.create"}';

      Comment

      • Pavels
        Member
        • Oct 2011
        • 83

        #4
        Originally posted by heaje
        Just curious here, but why don't you try to make the call with all the interface parameters outside of an array? I'm thinking something like this:

        $VAR1 = '{"auth":"xxxxxx","params":{"dns":"","useip":"1"," ip":"100.100.100.100","port ":"10051","status":"6","host":"PROXY"},"jsonrpc":" 2.0","id" :1,"method":"proxy.create"}';
        This won't work.

        Comment

        Working...