addaddondomain Failing with JSON API

ericpruitt

Registered
Jan 14, 2012
3
0
51
cPanel Access Level
Root Administrator
Hello,

I've run into problem when using the addaddondomain call using the cPanel API.
The parameters I'm using for the call are as follows:

cpanel_jsonapi_module=AddonDomain&
cpanel_jsonapi_func=addaddondomain&
cpanel_jsonapi_apiversion=2&
cpanel_jsonapi_user=testacct&
user=testacct&
dir=public_html&
newdomain=xxxtest.xxx&
subdomain=xxxtest.example.com.com&
pass=reasd23&

I know the two user definitions are redundant, but I just tried adding both to
see if that would fix the problem by some odd chance. Anyway, whenever I
execute this API call to try to add an addon domain, I get the following
response from the server:


"cpanelresult":{
"data":[
{
"result":1,
"reason":"Deleted domain: xxxtest.example.com.com\nBind reloading on emmafrost using rndc zone: [example.com.com]\nBind reloading on havok using rndc zone: [example.com.com]\n\nBind reloading on onslaught using rndc zone: [example.com.com]\n\nThe subdomain, xxxtest.example.com.com has been removed."
}
],
"event":{
"result":1
},
"module":"AddonDomain",
"apiversion":2,
"func":"addaddondomain"
}

If I use SubDomain::addsubdomain using a similar set of parameters, it works
just fine so I considering just using addsubdomain and then parking the domain
on the subdomain to achieve the same effect, but then I get this error when try
to park a domain "Error from park wrapper: Sorry, cannot determine nameserver
IPs. Please make sure that the domain is registered with a valid domain
registrar." However, parking a non-existent domain is generally not a problem
when done from the cPanel interface, so I'm not sure what's up wit that.
 

ericpruitt

Registered
Jan 14, 2012
3
0
51
cPanel Access Level
Root Administrator
When I try from the cPanel interface, I get the following:

Error from park wrapper: Sorry, cannot determine nameserver IPs. Please make sure that the domain is registered with a valid domain registrar.<br/>
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
When I try from the cPanel interface, I get the following:

Error from park wrapper: Sorry, cannot determine nameserver IPs. Please make sure that the domain is registered with a valid domain registrar.<br/>
Then there isn't an API issue, it's actually a conflict between how that domain is setup at their registrar and your tweak settings. Is this domain registered already?