This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How can I make network definition a member of network group using RESTful API?

Hello,

My restd version is 1.2.1 on UTM 9.505004. I can make a new network definition using API, but I can't find API way to make this network definition a member of existing network group definition. Any ideas?

Regards,

Jan



This thread was automatically locked due to age.
  • To add a Network Object to a Group im doing the following:
     
     
    $REF_NetGro = "REF_NetGroXYZ"
     
    $AllRefs = "REF_A,REF_B,REF_C"
     
    $header =@{}
    $header.add("Content-Type", "application/json")
    $header.add("Accept", "application/json")
    $header.add("X-Restd-Err-Ack","all")
    $header.add("X-Restd-Lock-Override", "yes")
     
    $body = '{"name":"Group_Name","members":["' + $AllRefs + '"]}'
     
    Try
    {
    $results=Invoke-RestMethod-Method PUT -Uri $uri-Credential $credential-Headers $header-Body $body 
    -ErrorVariable RestError
    }
    Catch
    {
    $RestError
    Write-Error$_.Exception
    }