How To Create An Addon Domain using the API?
Hi,
We are creating an in-house software that needs to use the Cpanel api to create addon domains on our own server.
Yes we have root access.
The current UAPI does not seem to have an equivalent function.
Using the cpanel api2 shows that it's deprecated (meaning removed soon?)
So is this very important function no longer available now?
Thanks
-
Using the cpanel api2 shows that it's deprecated (meaning removed soon?)
Hello :) You can still utilize the cPanel API 2 function that's documented here: cPanel API 2 Functions - AddonDomain::addaddondomain - Software Development Kit - cPanel Documentation There are no plans to remove support for this function until a comparable UAPI function is released. Thank you.0 -
Have you guys just basically abandoned UAPI development? I'm also looking for a way to create addon domains and there is still no UAPI equivalent to do this, 6 years later. 0 -
@cPanelMichael was a feature allowing us to add new domains via the UAPI ever made? The docs for cPanel API2 strongly recommends us to use UAPI instead of the cPanel API2. 0 -
The only thing I see in the UAPI area is subdomain creation: Create subdomain 0 -
On the backend, an add-on domain is technically a subdomain of the main cpanel user's domain with another domain parked on top of it. First, pointing to the subdomain - parkedontopofsub.com The add-on domain's http files can be uploaded to the subdomain's directory - /home/cpaneluser/www/sub.cpanelusersdomain.com 0 -
Hi I am trying to use the api to park a domain (I have a reseller account). I can successfully add a subdomain using: $apiUrl = "https://:2083/execute/SubDomain/addsubdomain?domain=$domain&rootdomain=$rootdomain&dir=$dir"; and I can use the whm api to, for example, access an accounts summary: $apiUrl = "https://:2087/json-api/accountsummary?api.version=1&user=udl"; But I cannot get the park domain to work: $apiUrl = "https://:2087/json-api/create_parked_domain_for_user?api.version=1&domain=$domain&username=$username&web_vhost_domain=$subdomain"; I get a permission error. Permission denied: You do not have the required privileges to run "create_parked_domain_for_user". Is this only available to root, is it a specific permission my provider need to activate, or is there something I'm missing? Thanks 0 -
As far as I can tell, that API call is only available to the root user. 0 -
As far as I can tell, that API call is only available to the root user.
Thanks. Looks like I will have to keep doing it manually then until I can justify getting my own server with root access. :( (It's a shame, because I've managed to automate every other step I needed)0
Please sign in to leave a comment.
Comments
8 comments