17 Replies Latest reply on Jun 15, 2017 1:13 PM by tdanner

    REST - HTTP Post - SWIS Invoke Orion.Container/CreateContainer Issue

    equalswql

      Hello All,

       

      I'm trying to do a http post to create a container and I can't seem to get the syntax right.

      I've tried almost every possible combination for the memberDefinition section and nothing seems to work...

       

      URL:

      https://localhost:17778/SolarWinds/InformationService/v3/Json/Invoke/Orion.Container/CreateContainer

       

      POST DATA:

      {"name":"Orion123","owner":"Core","frequency":60,"statusCalculator":0,"description":"testing container creation","pollingEnabled":"true","memberDefinitions":[<ArrayOfMemberDefinitionInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.solarwinds.com/2008/Orion"><MemberDefinitionInfo><Name>Testy123</Name><Definition>filter:/Orion.Nodes[CustomProperties.IT_Service='WAN' AND CustomProperties.Site_Code='USA']</Definition></MemberDefinitionInfo></ArrayOfMemberDefinitionInfo>]}

       

      from SWQL Studio if I populate the values through the Invoke function (right click on the CreateContainer option) I have no issue, so I'm assuming there must be some error with my JSON formatting.

       

      The above example is using the following format:

      "memberDefinitions":[%data%]

       

      I've also tried using another example found on thwack as well:

       

      {"name":"Orion123","owner":"Core","frequency":"60","statusCalculator":"0","description":"hello","pollingEnabled":"true","memberDefinitions":["name":"Test1234","definition":"filter:/Orion.Nodes[CustomProperties.IT_Service='WAN' AND CustomProperties.Site_Code='USA']"]}

       

      If anyone can assist with this, it would be greatly appreciated... trying to automate container creation, and hopefully group dependencies after -

       

      Help me DTANNER AND THWACK COMMUNITY, you're my only hope