Skip to main content
11-Garnet
March 16, 2021
Solved

External Data = Thingworx Only?

  • March 16, 2021
  • 1 reply
  • 2193 views

Hello,

 

If there was an existing IoT application already deployed that has relevant data for my Vuforia Experience, is there a way to get data directly from this 3rd party application, or must the data pass through a Thingworx entity property or service first and then into the Vuforia Experience?

 

Thanks!

Best answer by LS_9776545

So, this piece of code is running on my project: 

$scope.your_api_name = function() {
 var your_url= 'http://<your_url_domain>';
 var data_on_json_format ={'name': your_name, 'surname': your_surname};

 var req = {// aggiunta Giovanni Panozzo 9.10.2020
 method: 'POST',
 url: your_url,
 headers: {
 'Content-Type': 'text/plain'
 }, data: data_on_json_format
 }; 
 
 $http(req).then(function (response) { //chiamata api_svc_ricevicarrello 
 console.log(">> OK: your_api_name"); 
 console.warn(response);
 },function (response) {
 console.log(">> ERR: your_api_name") 
 }
 ); 
}

1 reply

1-Visitor
March 16, 2021

Hi, 

I think you could also use http get/post method for sending/receiving data. 

 

Take a look to: https://docs.angularjs.org/api/ng/service/$http

 

 

1-Visitor
March 17, 2021

So, this piece of code is running on my project: 

$scope.your_api_name = function() {
 var your_url= 'http://<your_url_domain>';
 var data_on_json_format ={'name': your_name, 'surname': your_surname};

 var req = {// aggiunta Giovanni Panozzo 9.10.2020
 method: 'POST',
 url: your_url,
 headers: {
 'Content-Type': 'text/plain'
 }, data: data_on_json_format
 }; 
 
 $http(req).then(function (response) { //chiamata api_svc_ricevicarrello 
 console.log(">> OK: your_api_name"); 
 console.warn(response);
 },function (response) {
 console.log(">> ERR: your_api_name") 
 }
 ); 
}
swstevens11-GarnetAuthor
11-Garnet
March 22, 2021

Thanks.  I'll give it a try.