Need to get parent_domain via API
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.
domain: subforaddon.sometestaddondomain.com
parent_domain: account1.comBut 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
domain: subforaddon.sometestaddondomain.com
rootdomain: sometestaddondomain.comBut 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.
Please sign in to leave a comment.
Comments
0 comments