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.

addaddondomain Failing with JSON API

Discussion in 'cPanel Developers' started by ericpruitt, Jan 14, 2012.

  1. ericpruitt

    ericpruitt Registered

    Joined:
    Jan 14, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    What happens when you add that addon domain via the cPanel UI (without APIs)?
     
  3. ericpruitt

    ericpruitt Registered

    Joined:
    Jan 14, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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/>
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    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?
     
  5. ericpruitt

    ericpruitt Registered

    Joined:
    Jan 14, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    No, the domain doesn't exist. I was unaware of the Tweak Settings option "Allow unregistered domains." Thanks a lot.
     
Loading...
Similar Threads - addaddondomain Failing JSON
  1. htmldesign
    Replies:
    3
    Views:
    572

Share This Page