Connect. Communicate. Collaborate. Securely.

Home » Developer Zone » API/SDK Writers » Create new IpAddressGroup
  •  
Jabba

Messages: 88
Karma: -1
Send a private message to this user
Hey all,

i have to create a new IpAddressGroup via API.
The request is this:
{"jsonrpc":"2.0","id": 1,"method":" IpAddressGroups.create","params":{"groups":[{"groupName ":"Test group"},{"description":"Test group"},{"type":"Host"},{"enabled":true},{"host":"192.168.0.1 "}]}}

and the complete response is this:
{"jsonrpc":"2.0","id":1,"result":{"errors":[{"inputIndex ":0,"code":1003,"message":"Host network address is not valid.","messageParameters":{"positionalParameters":[], "plurality":1}},{"inputIndex":1,"code":1003,"message": "Host network address is not valid.","messageParameters":{"positionalParameters":[], "plurality":1}},{"inputIndex":2,"code":1003,"message": "Cannot update %1, all fields in structure must be set. Missing field: %2.","messageParameters":{"positionalParameters":["IpAddress::host ","host"],"plurality":1}},{"inputIndex":3,"code":1003, "message":"Host network address is not valid.","messageParameters":{"positionalParameters":[], "plurality":1}},{"inputIndex":4,"code":1003,"message": "Host network address is not valid.","messageParameters":{"positionalParameters":[], "plurality":1}}]}}


What's wrong?

Thanks.
  •  
Miroslav Osladil (Kerio)

Messages: 188

Karma: 27
Send a private message to this user
Hello,
try this.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "IpAddressGroups.create",
  "params": {
    "groups": [
      {
        "groupName": "Test group",
        "host": "192.168.0.1",
        "type": "Host",
        "description": "Test entry",
        "enabled": true
      }
    ]
  }
}


Best regards,

Miroslav Osladil
Senior Developer
Kerio Technologies

The views I express are my own and do not necessarily reflect the views of Kerio Technologies.
Previous Topic: Settings.cfg
Next Topic: Injecting and retrieving calendar entries from Connect
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Sat Aug 19 09:17:33 CEST 2017

Total time taken to generate the page: 0.00364 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.