2 Replies Latest reply on Jun 8, 2017 11:39 AM by jvaranini

    Adding a node to a container using rest api

    jvaranini

      Hi Thwack,

       

      I need to add a node to a container.  The examples from both solarwinds and some other blogs reflect using XML.  Is it possible to form it into a rest call, using powershell?

       

      forexample

       

      $nodeSetting =

        @{

          containerId=$containerId

          MemberDefinitionInfo=???;

        }

        $nodeSettingjson = ConvertTo-Json $nodeSetting

        $url = "https://$($hostname):17778/SolarWinds/InformationService/v3/Json/Invoke/Orion.Container/AddDefinition"

        $result = Invoke-RestMethod -Uri $url -Credential $solarcreds -Method Post -Body $nodeSettingjson -ContentType application/json

       

      Thanks