Skip to main content
12-Amethyst
May 31, 2020
Solved

Create User on Remote Server

  • May 31, 2020
  • 2 replies
  • 977 views

Hi 

I have a requirement to perform the following operations on remote (child) TW servers from a (parent) TW server. Am planning to use ContentLoaderFunctions (PostJSON) from parent TW server to invoke a REST API call of remote TW server (Thingworx/Resources/EntityServices/ServiceDefinitions/CreateUser) with Appkey. 

  • Create a user 
  • Create a group
  • Add user to a group
  • Delete a user.

Please suggest me if there is any other better approach.

 

if we are creating the user with the help snippet, then we can use Resources["EntityServices"].CreateUser(params);. we can execute the same in remote server?

 

Appreciate your early response

 

Best answer by PaiChung

Just create a Service on your Child server that you then invoke from the parent server - still contentloader, but much safer because you can add validation and restrictions in your Service (wrapper)

You could make that easier by  adding Thingworx federation then it would be invoked over the wss pipe

You could also add something like an MQTT type interaction, now your parent drops the info on the queue and it is picked up by the child to then be executed.

2 replies

PaiChung22-Sapphire IAnswer
22-Sapphire I
June 1, 2020

Just create a Service on your Child server that you then invoke from the parent server - still contentloader, but much safer because you can add validation and restrictions in your Service (wrapper)

You could make that easier by  adding Thingworx federation then it would be invoked over the wss pipe

You could also add something like an MQTT type interaction, now your parent drops the info on the queue and it is picked up by the child to then be executed.

Support
June 9, 2020

Hi @nmohammed.

 

If the previous response answered your question, please mark it as the Accepted Solution for the benefit of others with the same question.

 

Thank you for participating in our community!

 

Regards.

 

--Sharon