Hello, I need to get parent domain for addon domain using cPanel/WHM API.
For example, I created an addon domain: sometestaddondomain.com and a subdomain for it: subforaddon.sometestaddondomain.com
If I call whmapi1 get_domain_info, I will get
But I expect that parent_domain is sometestaddondomain.com, because I will use it to recreate subdomain via uapi in case the subdomain was removed.
On the other hand, I can get correct info from old API.
cpapi2 --user=account1 SubDomain listsubdomains
But it might be not an option in case of space quota is reached for the account.
UAPI DomainInfo domains_data does not provide any info regarding parent domain.
Can you please give an advice how I should retrieve this info?
Thanks.
For example, I created an addon domain: sometestaddondomain.com and a subdomain for it: subforaddon.sometestaddondomain.com
If I call whmapi1 get_domain_info, I will get
Code:
domain: subforaddon.sometestaddondomain.com
parent_domain: account1.com
On the other hand, I can get correct info from old API.
cpapi2 --user=account1 SubDomain listsubdomains
Code:
domain: subforaddon.sometestaddondomain.com
rootdomain: sometestaddondomain.com
UAPI DomainInfo domains_data does not provide any info regarding parent domain.
Can you please give an advice how I should retrieve this info?
Thanks.
Last edited: