Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hi,
I'm trying to get data from weather web API.
var params = {
//proxyScheme: undefined /* STRING */,
//headers: undefined /* JSON */,
ignoreSSLErrors: true/* BOOLEAN */,
//useNTLM: undefined /* BOOLEAN */,
//workstation: undefined /* STRING */,
//useProxy: undefined /* BOOLEAN */,
//withCookies: undefined /* BOOLEAN */,
//proxyHost: undefined /* STRING */,
url: "https://api.openweathermap.org/data/2.5/weather?lat=16.4974&lon=80.6458&appid=appid", /* STRING */
//timeout: undefined /* NUMBER */,
//proxyPort: undefined /* INTEGER */,
password: "password" /* STRING */,
//domain: undefined /* STRING */,
username: "username" /* STRING */
};
// result: JSON
var myJson = Resources["ContentLoaderFunctions"].GetJSON(params);
result = myJson;
//me.Outside_Temperature= myJson.main.temp-273.15;
//me.Outside_Humidity = myJson.main.humidity;
It is giving output as below
[message: Execution error in service script [OutSideTemp] :: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target]
Solved! Go to Solution.