We have three Thingworx servers, For development, testing and production hosted with PTC. We have separate configuration Thing to store server specific properties. I don't want to maintain three different Things. But, instead based on URL/IP I want to load properties from Thing. Is there any way to read current server IP/URL ?
Not out of the box, we have a Custom Thing with a shared ThingShape/ThingTemplate in order to configure this kind of properties. The only thing to get your current IP will be to call an external "WhatsMyIP" service.
Nirav, the CurrentSessionInfo Resource has a service called 'GetCurrentIPAddress' to fetch the IP address.
Nirav it's asking for Server IP not User IP, anyway GetCurrentIPAddres ( which it's user IP ) almost never works
Ah my bad, I didn't read right. The GetCurrentIPAddres service will return the user address, not the platform.
You can use location.host in an Expression widget (and evaluate that) to get the current server address. You can bind the output to any service.
True, but this would depend on the use case. If Mashups are ultimately going to be used to pass through, this can be stored in a variable and passed on to a service.
Is it possible to write an extension to read server IP and call service from script ? whatismyip is 3rd party, I want to avoid it, if possible.