I tried to fetch data using restApi(using GET call), the thing is we have added a wildcard certificate to our platform which provides this API to access. I believe due to this, I am not able to retrieve any data Ignition throws an error as follows,
Error running action 'dom.onClick' on test@C/root/XYChart: Traceback (most recent call last): File "<function:runAction>", line 11, in runAction File "<function:runAction>", line 11, in runAction at com.inductiveautomation.ignition.common.script.builtin.http.JythonHttpClient.send(JythonHttpClient.java:103) at com.inductiveautomation.ignition.common.script.builtin.http.JythonHttpClient.get(JythonHttpClient.java:306) at jdk.internal.reflect.GeneratedMethodAccessor144.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) java.io.IOException: java.io.IOException:
Are there any arguments like verify = False to skip the SSL verification or any other workarounds to add the certificate to Ignition's trusted certificate store?
Help would be appreciated
thank you so much for your reply. Indeed it helped me a lot...
By any chance can we customize the logs which are triggered by the default mechanism?
because If I bypass SSL it triggers the log each time.
Also note: system.net.httpGet is 'soft' deprecated and likely to be fully deprecated in 8.3. system.net.httpClient() is superior in basically every way, and has a corresponding bypass_cert_validation flag that will do the same disabling of all SSL verification (with the same warning in the logs).
The hit is mitigated by following the advice in that caution. Do not call system.net.httpClient() for every request. Create a long-lived instance, and only use the .get() or .post() (or whatever) method per request.
Then the performance should be better than httpGet.
(If you are doing any of this in tag event scripts, you are seriously screwing up, and risk locking up all of your tag event scripting. Use gateway tag change events in a project for anything that reaches out across a network.)