Hello ...
I did not figure out how to get the main domain of the cPanel user through the API. Is this possible?
Thank you
Regards
Mat
Hello ...
I did not figure out how to get the main domain of the cPanel user through the API. Is this possible?
Thank you
Regards
Mat
Thank you.
And what's the URL to access the API1? And what method do I need to use to pass the command string? POST or GET?
Regards,
Mat
We have a PHP class you can use to interact with API1 via the XML API: http://forums.cpanel.net/showthread.php?t=111897
Otherwise, you can read the documentation on how to do this yourself at http://www.cPanel.net/plugins/xmlapi
I have previously looked at the documentation and the PHP class but there was nothing specific about the API1 print function. Hence my request. In the meanwhile with a bit of trial and error I figured it out:
API1:
<cpanel print="$CPDATA{'DNS'}">
translates to:
http://host:2082/xml-api/cpanel?xmlin=<cpanelaction><module>print</module><func>$CPDATA{'DNS'}</func><apiversion>1</apiversion></cpanelaction>
API1
<cpanel print="DOMAIN">
translates to:
http://host:2082/xml-api/cpanel?xmlin=<cpanelaction><module>print</module><func>DOMAIN</func><apiversion>1</apiversion></cpanelaction>