I am trying to call the APIGEE Edge REST Api's from java but getting UnknownHostException error

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.

0 2 557
2 REPLIES 2

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/sd...

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?

Not applicable

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.