I am trying to execute the API Management REST API to get the list of API's. https://<service>.management.azure-api.net/apis?api-version=2014-02-14
While executing through browser I am getting the output properly, but when I am trying to execute through java code it is giving following Error.
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I have enabled the API Management Services also. I am executing following code.
HttpsURLConnection con = null;
con = createConnection(url, proxyDetails);
con.setRequestMethod("GET");
con.addRequestProperty("Authorization", <Token>);
con.getResponseCode()
While getting the response code I am getting the error mentioned above.
Can someone please let me know why I am getting the certification error as I didn't find any document that mentions we need to use any certificate to use API Management Service?
Do I need to do any other setup except enabling the API Management Service check box in security section of manage?