How to list all Parked Domains with cPanel API 2 ?
I am creating new parked domain :
But when I try to list only parked domains I get only these created thru the web UI :
response :
?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=Park&cpanel_jsonapi_user=andreytestdom&domain=parkeddomainv1.com&topdomain=newaddondom&cpanel_jsonapi_func=parkBut when I try to list only parked domains I get only these created thru the web UI :
?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=Park&cpanel_jsonapi_user=andreytestdom&cpanel_jsonapi_func=listparkeddomainsresponse :
{
"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"
}
}-
?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=Park&cpanel_jsonapi_user=andreytestdom&domain=parkeddomainv1.com&topdomain=newaddondom&cpanel_jsonapi_func=park
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.0 -
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.
This is the response I get :{ "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.0 -
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: 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.0 -
Hello, To update, this behavior is by design. Use of the "topdomain" parameter to specify a subdomain will result in the creation of an addon domain name. I've opened a case with our documentation team to ensure this is noted on the following document: cPanel API 2 Functions - Park::park - Software Development Kit - cPanel Documentation Thanks! 0 -
Hello, The following document is now updated to reflect the behavior of the topdomain parameter: cPanel API 2 Functions - Park::park - Software Development Kit - cPanel Documentation Thank you. 0
Please sign in to leave a comment.
Comments
5 comments