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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

External Data = Thingworx Only?

swstevens
11-Garnet

External Data = Thingworx Only?

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!

ACCEPTED SOLUTION

Accepted Solutions

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")            
    }
    ); 
}

View solution in original post

4 REPLIES 4

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

 

 

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")            
    }
    ); 
}

Thanks.  I'll give it a try.

Worked for me, thanks!

Simple GET from world clock API updates the text of a 3D label.

http://worldclockapi.com/api/json/est/now

Announcements

Top Tags