Hello,
I want to perform HTTP Get using the APIKey to get the attached documents. For example: the following HTTP Get request renders the attached document from the browser:
https://<host>/maximo/api/os/LBL_DS_EVCHARGE/<restid>/doclinks/<doclinkid>?lean=1&apikey=<apikey>
I tried with the following:
handler = HTTPHandler()
map = HashMap()
map.put("URL", <the above url>)
map.put("HTTPMETHOD", "GET")
responseBytes = handler.invoke(map,None)
return responseBytes
However it gives error: the connection to the HTTP handler for the endpoint failed. Review the error and server log files to determine the cause of the issue, for example, incorrect properties in the DefaultHTTPExit.java handler class.
com.ibm.jsse2.util.j: PKIX path building failed: com.ibm.security.cert.IBMCertPathBuilderException: unable to find valid certification path to requested target
I am not sure whether the above code can work using the APIKey or not or it is supposed to work with username/password.
I therefore would like to use the python's native http "requests" library e.g. import requests. I tried import requests. However it gives error.
Any idea on how to use the "requests" module in the automation script?
Pankaj Bhide
------------------------------
Pankaj Bhide
------------------------------