The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    6
    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!
     
    #1 XenomediaBV, Sep 8, 2009
    Last edited: Sep 13, 2009
  2. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    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?
     
  3. XenomediaBV

    XenomediaBV Well-Known Member

    Joined:
    Sep 3, 2009
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    6
    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
     
    #3 XenomediaBV, Sep 8, 2009
    Last edited: Sep 8, 2009
  4. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    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
     
    #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:
    6
    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 ...?
     
  6. XenomediaBV

    XenomediaBV Well-Known Member

    Joined:
    Sep 3, 2009
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
    #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:
    6
    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.
     
    #7 XenomediaBV, Sep 13, 2009
    Last edited: Sep 13, 2009
  8. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Doh! Thanks, fixed.
     
Loading...

Share This Page