API call for "Park a Domain" in WHM (not cPanel)
In WHM, there's a facility called "Park a domain", useful when the "Aliases" feature of cPanel can't do what you need. It's particularly useful in situations like this...
If I have a cPanel account called "abc", with domain name "abc.com", and I wish to create a parked domain called "abc.myotheraccount.com" to be parked on top of "abc.com" (and "myotheraccount.com" is in a SEPARATE cPanel account on the same server), then cPanel's "Aliases" system won't let you do this, of course. But this IS possible via the "Park a domain" facility in WHM. I use this feature A LOT.
I want to know how to do this in the API (any cPanel API - api1, api2 or UAPI). I've searched the docco, but all I've found is the "park" function, which is equivalent to the cPanel "Aliases" facility, NOT the "Park a domain" facility in WHM. I tried it anyway, and (as expected) it didn't work.
Does anyone know if this is possible via one of the APIs?
Thanks in advance,
Mark.
-
Hello, There's no corresponding WHM API 1 function. You'd need to enable the following option under the "Domains" tab in "WHM >> Tweak Settings" to allow the addition of subdomains of other domain names owned by different accounts on the server: "Allow cPanel users to create subdomains across accounts" This would allow you to use the following cPanel API 2 function: cPanel API 2 Functions - Park::park - Software Development Kit - cPanel Documentation Thank you. 0 -
Thanks Michael. That's great. 0 -
In WHM, there's a facility called "Park a domain", useful when the "Aliases" feature of cPanel can't do what you need. It's particularly useful in situations like this... If I have a cPanel account called "abc", with domain name "abc.com", and I wish to create a parked domain called "abc.myotheraccount.com" to be parked on top of "abc.com" (and "myotheraccount.com" is in a SEPARATE cPanel account on the same server), then cPanel's "Aliases" system won't let you do this, of course. But this IS possible via the "Park a domain" facility in WHM. I use this feature A LOT. I want to know how to do this in the API (any cPanel API - api1, api2 or UAPI). I've searched the docco, but all I've found is the "park" function, which is equivalent to the cPanel "Aliases" facility, NOT the "Park a domain" facility in WHM. I tried it anyway, and (as expected) it didn't work. Does anyone know if this is possible via one of the APIs? Thanks in advance, Mark.
It can be done with HTTP GET request to the /scripts/park (including WHM authentication HTTP header):0 -
Unfortunately this doesn't work anymore with the new API tokens: Token authentication is restricted to WHMAPI calls only 0 -
Token authentication is restricted to WHMAPI calls only
Hello, There's a recent post on this topic at: Authentication to 3rd party plugins through scripting Thank you.0
Please sign in to leave a comment.
Comments
5 comments