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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cPanel api 2 and user interface difference for Parked Domains.

Discussion in 'cPanel Developers' started by Killy123, Jun 15, 2017.

Tags:
  1. Killy123

    Killy123 Member

    Joined:
    Oct 28, 2016
    Messages:
    18
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Bulgaria
    cPanel Access Level:
    Root Administrator
    When I run the following request thru the cPanel api2, I am parking the domain - "example112.com" on top of example111, which is previously created addon domain.
    Code:
    json-api/cpanel?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=Park&cpanel_jsonapi_func=park&cpanel_jsonapi_user=exampleAccount&domain=example112.com&topdomain=example111
    But when I try to add new domain thru the cPanel user interface at "frontend/paper_lantern/addon/index.html" with subdomain - "example111" the response is
    "(XID p32zy2) A DNS entry for the domain “example111.cnodetest12.com” already exists.".Is this suppose to behave differently thru the api and the user interface?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You are parking (aliasing) a domain name through a cPanel API 2 function, and adding a new domain name via the cPanel UI as an addon domain name. If you wanted to park a domain name through the cPanel UI, you'd use the "Aliases" option.

    Thank you.
     
  3. Killy123

    Killy123 Member

    Joined:
    Oct 28, 2016
    Messages:
    18
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Bulgaria
    cPanel Access Level:
    Root Administrator
    I am little confused here through cPanel UI "Aliases" is it possible to park a domain on top of "Addon domain"?I am able to add aliases only for the main domain in "Aliases" section.Is it in me the problem or the system works incorrectly?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I believe the confusion stems from the use of the "topdomain" parameter. Use of the "topdomain" parameter with the cPanel API 2 Park::park function to specify a subdomain actually results in the creation of an addon domain name. This is documented at:

    cPanel API 2 Functions - Park::park - Software Development Kit - cPanel Documentation

    Thank you.
     
  5. Killy123

    Killy123 Member

    Joined:
    Oct 28, 2016
    Messages:
    18
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Bulgaria
    cPanel Access Level:
    Root Administrator
    Thank you, but I do not think the conversation is moving forward.When you use the "topdomain" parameter with value of already existing addon domain.The Api parks the new Parked domain on top of that domain, which already exists, you could try that easily.If you use the "topdomain" param with new non-existing addon domain it creates it.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I believe the term "parked" is what's leading to the confusion. For example, I ran the following command on a system where "example111.tld" (with example111 as the corresponding subdomain) exists as an addon domain name under the "cptest01" account:

    Code:
    cpapi2 --user=cptest01 Park park domain=example112.tld topdomain=example111
    This setup "example112.tld" as an addon domain name under the "cptest01" account, not a parked domain (alias).

    With addon domain names, you are not adding domain names on top of other domain names. You simply configure the document root to match your preference.

    Thank you.
     
Loading...

Share This Page