There are XML-API functions for doing this:
AddonDomainRef < DeveloperResources/ApiRef < TWiki
SubDomainRef < DeveloperResources/ApiRef < TWiki
ParkRef < DeveloperResources/ApiRef < TWiki
So, for clarities sake, the easiest way to do this is (per API call) doing something like:
Code:
$cpanel/xml-api/cpanel?
cpanel_xmlapi_module=AddonDomains&
cpanel_xmlapi_func=listaddondomains
which will return an XML document full of the addon domains per account.
This can also be done through whm, however you will need to add a $user argument in order for the cpanel call to work correctly.