cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Create User on Remote Server

nmohammed
12-Amethyst

Create User on Remote Server

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

 

ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:nmohammed)

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.

View solution in original post

2 REPLIES 2
PaiChung
22-Sapphire I
(To:nmohammed)

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.

slangley
23-Emerald II
(To:nmohammed)

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

Announcements


Top Tags