Hi, how do i find the IP address of my Thingworx instance?
Hi Kosgi,
Is your ThingWorx server hosted locally? If so the IP address your looking for is that of your local machine. You can use the IP Config command inside a command prompt window to find this.
Is your ThingWorx server cloud hosted? If so, you could contact your service provider, eg Amazon Web Service (AWS), for this information.
regards,
Andy
This is my code to recover Server IP:
var error = false;
var result;
try{
var params = {
proxyScheme: undefined /* STRING */,
headers: {
"User-Agent": "ThingWorx"
},
ignoreSSLErrors: undefined /* BOOLEAN */,
useNTLM: undefined /* BOOLEAN */,
workstation: undefined /* STRING */,
useProxy: undefined /* BOOLEAN */,
withCookies: undefined /* BOOLEAN */,
proxyHost: undefined /* STRING */,
url: "http://bot.whatismyipaddress.com" /* STRING */,
timeout: 5,
proxyPort: undefined /* INTEGER */,
password: undefined /* STRING */,
domain: undefined /* STRING */,
username: undefined /* STRING */
};
// result: STRING
result = Resources["ContentLoaderFunctions"].GetText(params).split(";")[0];
if ((result==null) || (result=="")) error = true;
} catch(err) {
error = true;
result = "ERROR: "+err;
}
And this is an alternate way:
var result;
try{
var params = {
proxyScheme: undefined /* STRING */,
headers: undefined,
ignoreSSLErrors: undefined /* BOOLEAN */,
useNTLM: undefined /* BOOLEAN */,
workstation: undefined /* STRING */,
useProxy: undefined /* BOOLEAN */,
withCookies: undefined /* BOOLEAN */,
proxyHost: undefined /* STRING */,
url: "https://api.ipify.org" /* STRING */,
timeout: 5 /* NUMBER */,
proxyPort: undefined /* INTEGER */,
password: undefined /* STRING */,
domain: undefined /* STRING */,
username: undefined /* STRING */
};
// result: STRING
result = Resources["ContentLoaderFunctions"].GetText(params).split(";")[0];;
} catch(err) {
result = "ERROR: "+err;
}
If it is a "hosted" trial server from the Developer Portal, try doing a ping on the ip address (i.e. PP-18011714014O.devportal.ptc.io).