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.

How to list all Parked Domains with cPanel API 2 ?

Discussion in 'cPanel Developers' started by Killy123, Nov 16, 2016.

Tags:
  1. Killy123

    Killy123 Member

    Joined:
    Oct 28, 2016
    Messages:
    18
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Bulgaria
    cPanel Access Level:
    Root Administrator
    I am creating new parked domain :
    Code:
    ?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=Park&cpanel_jsonapi_user=andreytestdom&domain=parkeddomainv1.com&topdomain=newaddondom&cpanel_jsonapi_func=park
    But when I try to list only parked domains I get only these created thru the web UI :
    Code:
    ?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=Park&cpanel_jsonapi_user=andreytestdom&cpanel_jsonapi_func=listparkeddomains
    response :
    Code:
    {
      "cpanelresult": {
        "apiversion": 2,
        "data": [
          {
            "basedir": "public_html",
            "dir": "/var/home/andreytestdom/public_html",
            "status": "not redirected",
            "domain": "andreytest33333.com",
            "reldir": "home:public_html"
          },
          {
            "domain": "newaliastest.com",
            "status": "http://alisatest.com",
            "reldir": "home:public_html",
            "dir": "/var/home/andreytestdom/public_html",
            "basedir": "public_html"
          },
          {
            "basedir": "public_html",
            "dir": "/var/home/andreytestdom/public_html",
            "status": "not redirected",
            "domain": "newaliastesta1.com",
            "reldir": "home:public_html"
          }
        ],
        "event": {
          "result": 1
        },
        "module": "Park",
        "func": "listparkeddomains"
      }
    }
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,086
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you let us know the output when you run this command? Also, review "topdomain=newaddondom" to determine if it's nessisary. It's only used when you are parking a domain name on an existing subdomain of the account. Thus, you'd enter "subdomain1" if "subdomain1" is added as a subdomain to the account.

    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
    This is the response I get :
    Code:
    {
      "cpanelresult": {
        "data": [
          {
            "result": 1,
            "reason": "The system successfully parked (aliased) the domain “parkeddomainv1.com” on top of the domain “newaddondom.com”."
          }
        ],
        "event": {
          "result": 1
        },
        "apiversion": 2,
        "module": "Park",
        "func": "park"
      }
    }
    I reviewed "topdomain=newaddondom" , it is necessary.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,086
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    It seems like the use of the "topdomain" parameter is resulting in the creation of an addon domain name instead of a parked domain. You can verify this by reviewing the output of the following command:

    Code:
    uapi --user=example DomainInfo list_domains
    I've opened internal case CPANEL-9869 to report this behavior, and I'll update this thread with more information on the status of this case as it becomes available.

    Thank you.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,086
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,086
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page