list of add-on / parked domains from a script?

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
942
421
363
cPanel Access Level
DataCenter Provider
Is there any way to get a list of parked and add-on domains from a script? I know you can get the list from WHM but we want to put the information into another program and parsing the WHM web page output is a bit awkward.
 

cPanelStephen

Active Member
Staff member
Aug 7, 2007
25
0
51
You can use the XML-API to accomplish this. The documentation for the XML-API can be found at http://www.cpanel.net/plugins/xmlapi/

There are also numerous threads discussing the usage of this API that you might find beneficial.

Examples of the requested functions:

List add-on domains for an account:

Code:
https://${SERVER_IP}:2087/xml-api/cpanel?user=${CPANEL_USER}&xmlin=<cpanelaction><module>Park</module><apiversion>2</apiversion><func>listaddondomains</func></cpanelaction>
List parked domains for an account:

Code:
https://${SERVER_IP}:2087/xml-api/cpanel?user=${CPANEL_USER}&xmlin=<cpanelaction><module>Park</module><apiversion>2</apiversion><func>listparkeddomains</func></cpanelaction>
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
942
421
363
cPanel Access Level
DataCenter Provider
Hello,

Thanks for the answer (and I'll try to dig more) but we want to list the add-on and parked domains for all clients not client by client.