Skip to main content
1-Visitor
March 1, 2019
Solved

Get data on web app from 2 different things simultaneously

  • March 1, 2019
  • 1 reply
  • 884 views

Hello ,

I have created 2 things on my locally hosted Thingworx foundation server. There things belongs to 2 different templates.

 

I want to access data simultaneously using rest api or any other endpoint to my nodeJs web application. I am getting data in an interval of 1 second. Thus I cannot make 2 successive ajax calls to get data individually as huge latency is involved.

 

Kindly suggest how this can be done.

PS Note : I am able to get data individually for 1 sensor at a time using ajax call to the rest endpoint.

 

Regards,

Aarushi

Best answer by slangley

Hi @aarushi_mittal2.

 

If we're understanding correctly, you could create a service that would wrap the services for the 2 things.  You would need to combine the return from both services in such a way that your application can interpret it, such as an infotable merge.

 

If this does not answer your question, please provide more information on your use case and the application on the other end, and we will try to suggest a solution.

 

Regards.

 

--Sharon

1 reply

slangleyCommunity ManagerAnswer
Support
March 6, 2019

Hi @aarushi_mittal2.

 

If we're understanding correctly, you could create a service that would wrap the services for the 2 things.  You would need to combine the return from both services in such a way that your application can interpret it, such as an infotable merge.

 

If this does not answer your question, please provide more information on your use case and the application on the other end, and we will try to suggest a solution.

 

Regards.

 

--Sharon

Support
March 14, 2019

Hi @aarushi_mittal2.

 

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

 

Regards.

 

--Sharon