Skip to main content

How To Create An Addon Domain using the API?

Comments

8 comments

  • cPanelMichael
    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
  • Marvin74
    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
  • DennisMidjord
    @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
  • cPRex Jurassic Moderator
    The only thing I see in the UAPI area is subdomain creation: Create subdomain
    0
  • cPanelKeithS
    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
  • tullnet
    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
  • cPRex Jurassic Moderator
    As far as I can tell, that API call is only available to the root user.
    0
  • tullnet
    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.