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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

trial version and webservice

SaitoAnselmo
6-Contributor

trial version and webservice

Hi Alll,

 

I'm using the 30 days thingworx composer and tried to ping my twx server from my API machine, and didnt work out.

Also, I tried to do an API call from twx server to my API and it seems that they dont see each other.

My doubt is: the twx server from trial version cant see distant IPs, right?
(Unless you have the license, I think...).

Any tips?

Thanks,
Saito.

ACCEPTED SOLUTION

Accepted Solutions

Pings into trial servers are probably ignored, try using the wget command to your trial instance to test if you get a response.

 

The trial servers are not limited in their ability to reach any service available on the internet. Are you using a port or protocol other than 80/443 http/https? 

 

View solution in original post

8 REPLIES 8

Pings into trial servers are probably ignored, try using the wget command to your trial instance to test if you get a response.

 

The trial servers are not limited in their ability to reach any service available on the internet. Are you using a port or protocol other than 80/443 http/https? 

 

Thanks for the wget hint.
They see each other!

But still, my twx server cant reach my API server trought LoadFunctionsContent...somehow.

I'm using the "conventional" one, port 80 and protocol http.

Can you give more details? What JS code are you using to reach your API server? How are you triggering that code? Can you reach your API server with a browser?

Hi,

 

I'm using a JS code like this in my service:

 

var token = "x";
var params = {
headers: {"Accept": "application/json","Authorization": "Bearer "+token } /* JSON */,
url: "https://192.168.229.139:8080/historian-rest-api/v1/datapoints/currentvalue/mymachine.Simulation00001" /* STRING */,
};
var result = Resources["ContentLoaderFunctions"].GetText(params);

 

and yeah, I can see my API server with a browser.

The network where your API server is being hosted (192.168.x.x) is reserved for private networks, requests to that IP address can not be routed over the internet from where your ThingWorx trial server is being hosted to your API server.

Here are some options:

1. Configure your firewall and private network to allow the ThingWorx trial server access to your API server.

2. Host your API somewhere that it can be reached by the ThingWorx trial server.

3. Download ThingWorx and host it on the same network as your API server. 

Thanks!
I will try these options.

geva
15-Moonstone
(To:SaitoAnselmo)

FYI - for security reasons the trial servers are only configured with HTTPS endpoints (so not possible to do an HTTP REST API call)

Yes, and REST API calls to the trial servers do work when you use HTTPS. The trial servers present a valid wildcard certificate for *.devportal.ptc.io

Announcements


Top Tags