Add subdomain API
Hello,
I want to create a bash script that creates a subdomain for a user account and then removes it, if the user asks. Of course, I want this to be done at the press of a button.
Is there an API that I can use to help me create this functionality? I saw something that could help me but it's deprecated.
Thank you.
-
Hi, The addsubdomain API call is what you want (cPanel API 2 Functions - SubDomain::addsubdomain - Software Development Kit - cPanel Documentation). Since you are crafting the utility in Bash I recommend using our command line API tool in your script (assuming your bash script runs on the same system as cPanel & WHM). 0 -
Is there a risk in using this API call or will it be removed in a future release? Will you make an equivalent UAPI call?
Hello, There are no immediate plans to remove cPanel API 2 from the product. In the event we do remove it in the future, we would publish information about it's impending removal in advance so that you have time to prepare. Thank you.0
Please sign in to leave a comment.
Comments
3 comments