Skip to main content
1-Visitor
July 15, 2015
Solved

Adding a Thing to a Network

  • July 15, 2015
  • 2 replies
  • 2132 views

Hello,

I am trying to add a Thing to a network programatically,

It is intended in this case to add a parent

var params2 = {

    from : undefined,

    to : SiteName,

    connectionType : undefined

};

  

Networks['CustomerNetwork'].AddConnection(params2);

When tested I get an error about invalid connection type....  I however can not find a resource which lists valid connection types

    Best answer by michaele

    I seemed to have found a or the solution...   The connectionType appear to be Parent, Sibling or Child,  though I haven't yet tested all 3, At the very least Sibling works.  And I have been able to add a thing to a network in this way

    2 replies

    michaele1-VisitorAuthorAnswer
    1-Visitor
    July 15, 2015

    I seemed to have found a or the solution...   The connectionType appear to be Parent, Sibling or Child,  though I haven't yet tested all 3, At the very least Sibling works.  And I have been able to add a thing to a network in this way

    1-Visitor
    July 16, 2015

    Actually you can leave connection type as undefined by not even declaring it in the JSON parameter block, otherwise use contains.