Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

XML-API issues with API1 and API2 commands

Discussion in 'cPanel Developers' started by XenomediaBV, Sep 8, 2009.

  1. XenomediaBV

    XenomediaBV Well-Known Member

    Joined:
    Sep 3, 2009
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    The Netherlands
    cPanel Access Level:
    Root Administrator
    This topic is ment for issues I came across while building the XML-API class.

    AddonDomain::listaddondomains
    URL: https://*.domain.com:2087/xml-api/cpanel?user=cpaneluser&cpanel_xmlapi_module=AddonDomain&cpanel_xmlapi_func=listaddondomains&cpanel_xmlapi_version=2

    Result:
    HTML:
    <fatalerror>[a fatal error or timeout occurred while processing this directive]</fatalerror>  <cpanelresult>
        <apiversion>2</apiversion>
        <func>listaddondomains</func>
        <module>AddonDomain</module>
      </cpanelresult>
    Instead use:

    Park::listaddondomains
    URL: https://*.domain.com:2087/xml-api/cpanel?user=cpaneluser&cpanel_xmlapi_module=Park&cpanel_xmlapi_func=listaddondomains&cpanel_xmlapi_version=2

    Result:
    HTML:
    - <cpanelresult>
      <apiversion>2</apiversion> 
    - <data>
      <basedir>public_html/addontest</basedir> 
      <dir>/home/cpaneluser/public_html/addontest</dir> 
      <domain>addondomain.nl</domain> 
      <domainkey>addontest_domains.nl</domainkey> 
      <fullsubdomain>addontest.domains.nl</fullsubdomain> 
      <reldir>home:public_html/addontest</reldir> 
      <rootdomain>domains.nl</rootdomain> 
      <status>not redirected</status> 
      <subdomain>addontest</subdomain> 
      </data>
      <func>listaddondomains</func> 
      <module>Park</module> 
      </cpanelresult>
    
    Note: Addondomains cpanel.* , whm.* , webmail.* and webdisk.* are ignored!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 XenomediaBV, Sep 8, 2009
    Last edited: Sep 13, 2009
  2. MattDees

    MattDees Well-Known Member

    Joined:
    Apr 29, 2005
    Messages:
    416
    Likes Received:
    1
    Trophy Points:
    243
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    That.. rather sucks, doing this in "slow" mode works fine if you call it via the Park module.

    What version are you testing against so that I can verify scope of the issue?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. XenomediaBV

    XenomediaBV Well-Known Member

    Joined:
    Sep 3, 2009
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    The Netherlands
    cPanel Access Level:
    Root Administrator
    I tested both AddonDomain and Park, without succes.

    The version used: cPanel 11.24.5-S38506 - WHM 11.24.2 - X 3.9
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #3 XenomediaBV, Sep 8, 2009
    Last edited: Sep 8, 2009
  4. MattDees

    MattDees Well-Known Member

    Joined:
    Apr 29, 2005
    Messages:
    416
    Likes Received:
    1
    Trophy Points:
    243
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Strange, I was unable to verify this on 11.24-based systems. Could you please open a ticket at tickets.cpanel.net/submit/ so that I can take a look at your server?

    Please include this thread in the ticket body and "ATTN: MATT" in the ticket subject
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #4 MattDees, Sep 10, 2009
    Last edited: Sep 10, 2009
  5. XenomediaBV

    XenomediaBV Well-Known Member

    Joined:
    Sep 3, 2009
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    The Netherlands
    cPanel Access Level:
    Root Administrator
    Documentation for MysqlIFE and Mysql are the same

    Documentation on the cPanel API Reference for MysqlIFE and Mysql are the same? Mysql redirects to MysqlFE. Is that on purpose or ...?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. XenomediaBV

    XenomediaBV Well-Known Member

    Joined:
    Sep 3, 2009
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    The Netherlands
    cPanel Access Level:
    Root Administrator
    addpop only for topdomain

    Email::addpop
    URL: https://*.domain.com:2087/xml-api/cpanel?user=cpaneluser&cpanel_xmlapi_module=Email&cpanel_xmlapi_func=addpop&cpanel_xmlapi_version=1&arg-0=someuser&arg-1=somedomain&arg-2=somepass

    In case you're breakin' your head about using addpop()-function with a parked domain.
    Note: This function can only create a new pop using the topdomain of the cpanel account. Parked domains will be ignored.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #6 XenomediaBV, Sep 13, 2009
    Last edited: Sep 13, 2009
  7. XenomediaBV

    XenomediaBV Well-Known Member

    Joined:
    Sep 3, 2009
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    The Netherlands
    cPanel Access Level:
    Root Administrator
    Subdomain removal function only for topdomain

    SubDomain::delsubdomain
    URL: https://*.domain.com:2087/xml-api/cpanel?user=cpaneluser&cpanel_xmlapi_module=Subdomain& cpanel_xmlapi_func=delsubdomain&cpanel_xmlapi_version=2&domain=sub

    In case you're breakin' your head about removing a subdomain from a parked domain.
    Note: This function can only remove a subdomain created with the topdomain of a cpanel account. Trying to remove a sub(parked)domain returns an error xml saying that the subdomain cannot be removed because it's trying to remove the specified subdomain from the topdomain.

    The addsubdomain function however can also create subdomains using a parked domain.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #7 XenomediaBV, Sep 13, 2009
    Last edited: Sep 13, 2009
  8. MattDees

    MattDees Well-Known Member

    Joined:
    Apr 29, 2005
    Messages:
    416
    Likes Received:
    1
    Trophy Points:
    243
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Doh! Thanks, fixed.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice