Skip to main content
1-Visitor
January 20, 2018
Question

Hi, how do i find the IP address of my Thingworx instance?

  • January 20, 2018
  • 3 replies
  • 3805 views

Hi, how do i find the IP address of my Thingworx instance?

3 replies

12-Amethyst
January 22, 2018

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

1-Visitor
January 22, 2018

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;

}

5-Regular Member
January 22, 2018

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).


DetermineIPAddress.jpg