terminatereseller function from within your custom script:
/xml-api/terminatereseller function call name, plus the required variables (see below), to a URL which includes the address of your server.
example.com, you would include the following string in your script: https://example.com:2087/xml-api/terminatereseller
terminatereseller function from within your custom script:
/json-api/terminatereseller function call name, plus the required variables (see below), to a URL which includes the address of your server.
example.com, you would include the following string in your script: https://example.com:2087/json-api/terminatereseller
terminatereseller function takes the following required variables as input: 1 — yes.
0 — no.
$resellername with the name of the reseller: I%20understand%20this%20will%20irrevocably%20remove %20all%20the%20accounts%20owned%20by%20the%20reseller%20$resellername
terminatereseller function. 1 — success.
0 — failure.
/xml-api/terminatereseller?reseller=bob&terminatereseller=1&verify=I%20
understand%20this%20will%20irrevocably%20remove%20all%20the%20
accounts%20owned%20by%20the%20reseller%20bob will produce output similar to:
<terminatereseller>
<result>
<accts>
<name>account1</name>
<rawout>
Collecting Domain Name and IP...User: account1 Domain: account1.tld ... Done Killing all processes owned by user......Done Cleaning passwd,shadow,group ......Done Removing User from Group..........Done Removing Web Logs......Done Removing Crontab......Done Removing Virtual Hosts...Removed Extra Entries from httpd.conf ...Done Removing System User......Done Removing Group......Done Removing DNS Entries...account1.tld -> deleted from servername. ...Done Removing Email Setup...Removing /etc/valiases/account1.tld ...Done Removing mailman lists......Done Removing MySQL databases and users......Done Removing remotedomains,secondarymx,localdomains entries......Done Adding ip back to ipaddrpool...System has 0 free ips. ...Done Removing user's cPanel Databases & Updating......Done Reloading Services......DoneSending Contacts......Done Updating internal databases...Updating ftp passwords for all users Ftp password files updated. Ftp vhost passwords synced ...Done Running post removal scripts......Done <br /><b>Account Removal Complete!!!</b><br />
</rawout>
<status>1</status>
<statusmsg>account1 account removed</statusmsg>
</accts>
<accts>
<name>bob</name>
<rawout>
Collecting Domain Name and IP...User: bob Domain: bob.tld ...Done Killing all processes owned by user......Done Cleaning passwd,shadow,group......Done Removing User from Group..........Done Removing Web Logs......Done Removing Crontab......Done Removing Virtual Hosts...Removed Extra Entries from httpd.conf ...Done Removing System User......Done Removing Group......Done Removing DNS Entries......bob.tld -> deleted from servername. ...Done Unable to unlink /var/named/bob.tld.db, file does not exist.bob.tld -> deleted from servername. ...Done Removing Email Setup...Removing /etc/valiases/bob.tld ...Done Removing mailman lists......Done Removing MySQL databases and users...Database ``bob_db1'' dropped Database ``bob'' dropped ...Done Removing remotedomains,secondarymx,localdomains entries......Done Adding ip back to ipaddrpool...System has 0 free ips. ...Done Removing user's cPanel Databases & Updating......Done Reloading Services......Done Sending Contacts......Done Updating internal databases...Updating ftp passwords for all users Ftp password files updated. Ftp vhost passwords synced ...Done Running post removal scripts......Done <br /><b>Account Removal Complete!!!</b><br />
</rawout>
<status>1</status>
<statusmsg>bob account removed</statusmsg>
</accts>
<privdelete>1</privdelete>
<status>1</status>
<statusmsg>Account Terminations Complete</statusmsg>
</result>
</terminatereseller>
/json-api/terminatereseller?reseller=bob&terminatereseller=1&verify=I%20
understand%20this%20will%20irrevocably%20remove%20all%20the%20
accounts%20owned%20by%20the%20reseller%20bob will produce output similar to:
{
"result":[
{
"status":1,
"privdelete":1,
"statusmsg":"Account Terminations Complete",
"accts":{
"paige":{
"status":1,
"statusmsg":"bob account removed",
"rawout":"Running pre removal script (/scripts/prekillacct)......
DoneCollecting Domain Name and IP...User: bob\nDomain: example.com\n...
DoneKilling all processes owned by user......DoneCleaning passwd,shadow,
group......DoneRemoving User from Group..........
DoneRemoving Web Logs......DoneRemoving Bandwidth Files......
DoneRemoving Crontab......DoneRemoving Virtual Hosts...Removed
Extra Entries from httpd.conf\nexample.com not found in httpd.conf.\n...
DoneRemoving MySQL databases and users......DoneRemoving
PostgreSQL databases and users......DoneRemoving System User......
DoneRemoving Group......DoneRemoving DNS Entries...example.com
=> deleted from server. \n...DoneRemoving Email Setup...Removing
/etc/valiases/example.com\n...DoneRemoving mailman lists......
DoneRemoving remotedomains,secondarymx,localdomains entries......
DoneRemoving Counter Data......DoneAdding ip back to the ip address pool...
System has 2 free ips.\n...DoneRemoving user's cPanel Databases &
Updating......DoneReloading Services......DoneRemoving mail and service
configs...\n...DoneSending Contacts......DoneUpdating internal databases...
Updating ftp passwords for bob\nPurging ftp user paige\nFtp password files
updated.\nFtp vhost passwords synced\n...DoneRunning post removal scripts
(/scripts/legacypostkillacct, /scripts/postkillacct)......DoneAccount Removal
Complete!!!...bob account removed...Done"
}
}
}
]
}
Copyright © cPanel 2000-2009.