help me !!!!!about Virtualmin API

I’m developing Virtualmin (GPL) billing system,Encountered a problem,
in Command Line Help

Deletes an existing Virtualmin virtual server and all sub-servers,
mailboxes and alias domains.

virtualmin delete-domain [–domain]*
[–user username]*
This means that the remote API to delete a virtual server, must be added to domin and username parameters

The problem here, If my Customers Changed the domin Platform through Virtualmin Not in the billing system,now how can i know the new domain.

If I am still using the old name will go wrong

Couldn’t you list the existing domains and compare/update what you have in the system?

virtualmin list-domains --multiline


Yeah, the billing system may not be able to store the domain name… instead, if you only keep track of the username, you can then query Virtualmin using the API in order to determine what domains belong to that user whenever displaying the domains for that user.

Then, if the domain changes, no problem – next time the page is refreshed, it’ll be showing the correct domains.


yes , i see now ,i can only use username parameters


that all virtual server will be deleted When the user’s name = username

I’ve tested, and can be used normally