|
||||
|
cpanel api from WHM
Hi
I think we can call cpanel api through whm right? CallingAPIFunctions < AllDocumentation/AutomationIntegration < TWiki says that :Under certain circumstances, you may need to use the XML or JSON API as a "wrapper" to access the functions performed by API version 1 or version 2. You can do this from within either WebHost Manager or cPanel. This is what I did: in whm i hit : domain.com:2086/xml-api/cpanel?cpanel_xmlapi_user=root&cpanel_xmlapi_modul e=Email&cpanel_xmlapi_func=listpopswithdisk%20&cpa nel_xmlapi_version=2&domain=somedomain.com and I got following result: <cpanelresult> <apiversion>2</apiversion> <func>listpopswithdisk </func> <module>Email</module> </cpanelresult> Did I go wrong somewhere? I need to be able to call Cpanel Api functions without logging in to respective cPanel but from WHM itself. HELP!!
Last edited by broncha; 07-15-2009 at 08:48 PM. |
|
||||
|
Quote:
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit |
|
||||
|
Quote:
Are you still trying to do Email::listpopswithdisk like you were before? Be sure to trim the trailing space from listpopswithdisk if you are using the code you pasted earlier. If that doesn't work, please let me know what you are experiencing (error message, login screen etc.).
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit |
|
||||
|
Hi
I tried the same with cPanel : somedomain.com:2082/xml-api/cpanel?cpanel_xmlapi_user=username&cpanel_xmlapi_m odul e=Email&cpanel_xmlapi_func=listpopswithdisk&cpanel _xmlapi_version=2&domain=somedomain.com The result is: <cpanelresult> <apiversion>1</apiversion> <type>text</type> − <data> <result>0</result> <reason>No Valid Command Given.</reason> </data> </cpanelresult> check these: Quote:
|
|
||||
|
This can happen if you have spaces in your URL. Please remove all spaces.
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit |
|
||||
|
Quote:
In cPanel, the username parameter is essentially ignored since you only have access to 1 account so the APIs assume you're performing the task on the only account you have access to. In WHM, the username parameter is important since as a reseller or root user you can have access to many accounts. Be sure to specify the username parameter correctly and remember that it is case-sensitive. If you insert a username that is wrong, the API call can still work in cPanel. However since this is important in WHM, it will cause the API call to malfunction in WHM.
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit |
|
||||
|
Quote:
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit |
|
||||
|
Please provide your full cPanel version information as well as the API URL you are sending to WHM or cPanel. This will allow me to assist you.
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit |
|
|||
|
broncha, that's not entire correctly, but that is the jist of the issue.
In some cases cpanel_xmlapi_user does not work - it appears to be an issue with the 11.24.4 version (while it seems to work on 11.24.7+ ) |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| WHM / cPanel API | paulipv | Developer Discussions | 9 | 07-09-2009 03:30 PM |
| cPanel/WHM API? | hb-travisbell | cPanel and WHM Discussions | 2 | 11-26-2006 06:42 PM |
| cPanel/WHM API help | webadpro | cPanel and WHM Discussions | 5 | 03-02-2006 03:18 PM |
| CpanelAppz.com WHM/cpanel API | anand | Developer Discussions | 27 | 02-10-2005 09:13 AM |
| Cpanel/Whm API | farshad_s3 | cPanel and WHM Discussions | 17 | 09-17-2004 01:14 PM |