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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

How to call services of one thingworx in other thingworx?

ranjank
15-Moonstone

How to call services of one thingworx in other thingworx?

Hi Team,

 

Suppose I want to call one common service of 5 ThingWorx Environments in one service of master ThingWorx environment (can say 6th environment) to see the result on any mashup in 6th environment.

 

Result on mashup in 6th enironment will be like :-

Env1---> ResultOfEnv1

Env2---> ResultOfEnv2

Env3---> ResultOfEnv3

Env4---> ResultOfEnv4

Env5---> ResultOfEnv5

 

What would be the solution?

 

Thanks in advance.

 

ACCEPTED SOLUTION

Accepted Solutions
ranjank
15-Moonstone
(To:zyuan1)

Hi @zyuan1 ,

 

Below solution has worked for me:-

PostJSON() is used for executing services and GetJSON() is used for getting property values of any other ThingWorx environment.

 

Atlast I have shown the result in of a responsive Grid on mashup

View solution in original post

4 REPLIES 4

2 ways.

1. Use REST API call to retrieve information

2. Federation settings, it can share Stream, Datatable information

https://support.ptc.com/help/thingworx/platform/r9/en/index.html#page/ThingWorx%2FHelp%2FComposer%2FFederation%2FFederation.html 

ranjank
15-Moonstone
(To:zyuan1)

Hi @zyuan1 ,

 

Can you pls share the snippet of using REST API for accessing Things and Services of other environment ThingWorx so that I can have a try. 

I'm thinking about using Link widget in the mashup with a popup window, and the Link will navigate to the mashup from another TWX server.

 

While talking about requesting through services, I'm thinking about whether GetJson, LoadXML services could work, and put REST request in their content, and pharse the result back to infotables and strings.

ranjank
15-Moonstone
(To:zyuan1)

Hi @zyuan1 ,

 

Below solution has worked for me:-

PostJSON() is used for executing services and GetJSON() is used for getting property values of any other ThingWorx environment.

 

Atlast I have shown the result in of a responsive Grid on mashup

Announcements


Top Tags