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.

Whm Cpanel Park API not allowing to park a domain on an existing subdomain

Discussion in 'cPanel Developers' started by djow, Aug 11, 2011.

  1. djow

    djow Registered

    Joined:
    Aug 11, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I'm trying to use the Xml API, to park a domain (example.com) to an existing subdomain (sub.anotherdomain.com).

    maindomain.com is the main domain registered for my user (reseller account)
    anotherdomain.com is an already parked domain, and it points to maindomain.com
    sub.anotherdomain.com is an existing and active subdomain

    when I try to park another domain (example.com) to point to sub.anotherdomain.com, using:

    $xmlapi->api2_query($username,'Park', 'park', array('domain'=>'anotherdomain.com','topdomain'=>'sub.anotherdomain.com'));
    or
    $xmlapi->api1_query($username,'Park', 'park', array('anotherdomain.com','sub.anotherdomain.com'));

    I get an error message:
    sub.anotherdomain.com.maindomain.com is not a valid domain name

    No matter what I do, It always append the maindomain.com to the topdomain parameter.

    Using de WHM UI > DNS Functions > Park a Domain, it works fine.

    How can I resolve this, calling the API?

    Thanks in advance

    ApiPark < ApiDocs/Api1 < TWiki
    ApiPark < ApiDocs/Api2 < TWiki
     
  2. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi djow,

    In your arguements to the API2 Park::park, 'topdomain' should simply be 'sub' (and not the fully qualified subdomain).

    Regards,
    -DavidN
     
  3. djow

    djow Registered

    Joined:
    Aug 11, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi CPanelDavidN,

    thanks for the reply, but if I put only 'sub', it points to the wrong subdomain: sub.maindomain.com
    I need to point to sub.anotherdomain.com not the sub.maindomain.com, is it possible?

    Regards
     
  4. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    what version of cPanel/WHM are you using?

    Thanks,
    -DavidN
     
  5. djow

    djow Registered

    Joined:
    Aug 11, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    WHM 11.30.2 (build 1)
    CLOUDLINUX 5.6 x86_64 standard

    cPanel Version11.30.2.1

    Regards
     
  6. djow

    djow Registered

    Joined:
    Aug 11, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Re: Whm Cpanel Park API not allowing to park a domain on an existing subdom

    Is there any solution for this, or is this a bug on the API?

    Thanks
     
Loading...

Share This Page