There's no rest interface to the AppDynamics downloads site as far as I can tell, you could however simply do a get as the filename can be determined:
https://aperture.appdynamics.com/download/prox/download-file/sun-jvm/4.2.7.1/AppServerAgent-4.2.7.1.zip - this is the agent for the SUN
https://aperture.appdynamics.com/download/prox/download-file/ibm-jvm/4.2.7.1/AppServerAgent-ibm-4.2.7.1.zip - this is the IBM agent
Alernatively, you could host the versions in your own internal network and simply get this by your own naming standard. You may want to deploy a later version of the agent (same major/minor version) than you are running on the controller so if you always copy/GET the latest 4.2.X version. This would require the versions/media to be maintained however.