Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do you build a java client target ( to call AppDynamics health rules API ?

Question :

Is there any example of how to correctly call the AppDynamics rest API health rules using java?



Our team is working on calling the health rules API in appDynamics using java

( library )

Below is the client request call put together, it is currently returning a socket timeout exception. From the research, I have done this should be the correct format in java on how to build the client call for the health rules, but is not working.


Wondering if someone from the community can provide more insight on how to do this in Java.

Thank You

How do you build a java rest API client ( to call the AppDynamics HealthRules API


Client client =;, "MyClientApp");, 600000);, 600000);, 600000);,SecurityType.BasicAuth);, "user@customer1");, "password");

 healthRulesCall ="").queryParam("count", 100)
.queryParam("offset", 0).request().accept(MediaType.APPLICATION_XML_TYPE).get(String.class);



Philipp.von dem Bussche-Huennefeld
AppDynamics Team (Retired)

Hi Theophilus.Borrero


Socket timeout might be caused by not being able to connect through the network in between. Have you tried doing a telnet or curl to the following address ?


Also I saw you are using this property twice


Once with a number which might indicate a timeout and then with the actual authentication type. Maybe that needs to be fixed as well.


Anyways if there was something wrong with authentication then I would expect you receiving a 401 HTTP return code but it seems you are not even getting to your target.



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.