Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I believe that you are not looking fte the LiveAPI since the LiveAPI is for developing inside cPAnel/WHM. The LiveAPI is for creating plugins inside the cPanel and WHM interfaces.</p> <p>If you are looking to add a subdomain to your account, the JSON/XML API's are much more suited to your task. If possible use the JSON api since cPanel Docs cite it as the preferred API due to it being faster than the XML api. To add a subdomain using the JSON/XML APIs you would use the following API call:</p> <p>XML:</p> <p><a href="https://domain.tld:2083/xml-api/cpanel?cpanel_xmlapi_func=addsubdomain&amp;cpanel_xmlapi_module=SubDomain&amp;cpanel_xmlapi_version=2&amp;domain=sub&amp;rootdomain=maindomain.tld" rel="nofollow">https://domain.tld:2083/xml-api/cpanel?cpanel_xmlapi_func=addsubdomain&amp;cpanel_xmlapi_module=SubDomain&amp;cpanel_xmlapi_version=2&amp;domain=sub&amp;rootdomain=maindomain.tld</a></p> <p>JSON:</p> <p><a href="https://domain.tld:2083/json-api/cpanel?cpanel_jsonapi_func=addsubdomain&amp;cpanel_jsonapi_module=SubDomain&amp;cpanel_jsonapi_version=2&amp;domain=sub&amp;rootdomain=maindomain.tld" rel="nofollow">https://domain.tld:2083/json-api/cpanel?cpanel_jsonapi_func=addsubdomain&amp;cpanel_jsonapi_module=SubDomain&amp;cpanel_jsonapi_version=2&amp;domain=sub&amp;rootdomain=maindomain.tld</a></p> <p>In the above string the arguments that you will need to modify are:</p> <ul> <li><strong>domain</strong> (string) - The local part of the subdomain you wish to add. (e.g. 'sub' if the subdomain's is sub.example.com) This value should not include the domain with which the subdomain is associated.</li> <li><strong>rootdomain</strong> (string) - The domain to which you wish to add the subdomain.</li> </ul> <p>Below is further documentation including how to integrate these API commands into your php scripts and how to authorize for the API.</p> <ul> <li><a href="http://docs.cpanel.net/twiki/bin/vief/ApiDocs/Api2/ApiSubDomain#SubDomain::addsubdomain" rel="nofollow">http://docs.cpanel.net/twiki/bin/vief/ApiDocs/Api2/ApiSubDomain#SubDomain::addsubdomain</a></li> <li><a href="http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/CallingAPIFunctions" rel="nofollow">http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/CallingAPIFunctions</a></li> <li><a href="http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/XmlApi" rel="nofollow">http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/XmlApi</a></li> <li><a href="http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/ApiAuthentication" rel="nofollow">http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/ApiAuthentication</a></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload