Skip to main content
1-Visitor
December 3, 2018
Solved

Is it possible to create network using .net sdk?

  • December 3, 2018
  • 1 reply
  • 1642 views

Hi,

I need to create hierarchy of things on thingworx platform where I need to show a gateway as a thing and devices connected to this gateway. 

Like: 

  •    GatewayThing
    • DeviceThing1
    • DeviceThing2  
    • DeviceThing3

This is possible by creating network on the platform. However, is it possible to create network using .net SDK?

 

 

Best answer by jamesm1

You can access any of the Thingworx server APIs via the client.invokeService method. If you are in the virtual thing class, you can use the this.getClient() method to get the client, and then invoke the service. In this way you can then use the EntityServices as normal to create the network.

 

Also, if you are using the EMS, there is a complete reflection of the Thingworx server API provided by the EMS, and you can call the same REST api you would on the server, except to the address of the EMS instead of the server, to achieve the same.

1 reply

5-Regular Member
December 3, 2018

Hello.

 

I don't think that's part of the functionality of the SDK itself. Looking at how the EMS Gateway works, I just don't see any methods that would accomplish what you're asking, at least as I understand it.

 

Is there a particular reason you need to do this from the SDK and not within the platform?

 

Thanks!

 

-- Craig A.

jamesm15-Regular MemberAnswer
5-Regular Member
December 4, 2018

You can access any of the Thingworx server APIs via the client.invokeService method. If you are in the virtual thing class, you can use the this.getClient() method to get the client, and then invoke the service. In this way you can then use the EntityServices as normal to create the network.

 

Also, if you are using the EMS, there is a complete reflection of the Thingworx server API provided by the EMS, and you can call the same REST api you would on the server, except to the address of the EMS instead of the server, to achieve the same.

Support
December 14, 2018

Hi @Shivaji.

 

If one of the previous responses provided a solution to your problem, please mark it as the Accepted Solution for the benefit of others with similar issues.

 

Regards.

 

--Sharon