I am trying to call the APIGEE Edge REST Api's from java using simple http connection but below getting UnknownHostException error
API's try to connect : https://api.enterprise.apigee.com/v1/organizations/{org_name}/apiproducts
I have tried to call this API through Spring RestTemplate but getting the same error.
java.net.UnknownHostException: api.enterprise.apigee.com
Note : I am using free trail account of APIGEE.
Answer by Priyadarshi Ajitav Jena · Feb 23 at 07:44 PM
Just check if you can do a curl request from your local as
curl -v https://api.enterprise.apigee.com
Whether you can connect? If not then check with your network team.
Answer by ylesyuk · Feb 23 at 07:07 PM
There is nothing special for an http client call to call an apigee management api. There're many examples of doing this in github. For example,
https://github.com/apigee/apigee-deploy-maven-plugin/blob/master/src/main/java/com/apigee/mgmtapi/sdk/client/MgmtAPIClient.java
Your error indicates some DNS problem. I.e., inability to resolve a hostname into an IP address.
Are you calling it from your company intranet and you need some proxy settings to execute a request to an Intranet host?
Test Environment 1 Answer
How to Print the Distance Returned by Google API on Browser ? 1 Answer
Get the number of developers registered in Edge 1 Answer
i just created a new proxy, while deploying to Edge seeing this error. 1 Answer
How to drop empty SOAP-Body elements in REST-SOAP-REST proxy 1 Answer