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

How to call services of one thingworx in other thingworx?

SOLVED
Highlighted
Aquamarine

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How to call services of one thingworx in other thingworx?

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
Highlighted

Re: How to call services of one thingworx in other thingworx?

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%2F... 

Highlighted

Re: How to call services of one thingworx in other thingworx?

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. 

Highlighted

Re: How to call services of one thingworx in other thingworx?

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.

Highlighted

Re: How to call services of one thingworx in other thingworx?

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

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!