Skip to main content
1-Visitor
Jan 20, 2018 3:45 PM UTC
Question

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

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

3 replies

12-Amethyst
Jan 22, 2018 10:28 AM UTC

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

Translate
1-Visitor
Jan 22, 2018 11:09 AM UTC

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;

}

Translate
5-Regular Member
Jan 22, 2018 3:54 PM UTC

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

Translate