Where is the Virtualmin API?

7 posts / 0 new
Last post
#1 Sat, 07/04/2009 - 02:40
dayo

Where is the Virtualmin API?

Seems all the links to old articles and stuff is broken and can't find a link to the API.

Also, are there any plans to make the site list features and stuff you expect when looking at a software site?

Sat, 07/04/2009 - 02:50
Joe
Joe's picture

I'm working on the API docs importer right now.

But, the command line tools are all self-documenting, so you have access to the docs already:

virtualmin --help

virtualmin create-domain --help

Etc.

The remote API is exactly the same, only in URL form:

https://user:pass@domain.tld:10000/virtual-server/remote.cgi?program=cre...

And so on.

I hope to finish up the API docs importer before I hit the sack.

Also, are there any plans to make the site list features and stuff you expect when looking at a software site?

Maybe. ;-)

Honestly, though, we're already selling more software than we can support right now. We're trying to figure that problem out as fast as possible. We're getting there.

Seriously, though, of course. We launched the new site precisely because the old one made it really hard to add things and keep things improving. The site now improves a little each day, though in a lot of cases it's refining things so they work better rather than making sweeping changes.

We also wanted to start from scratch because the old site had tons and tons of random crud that answered every possible question about everything, but nobody could ever find what they were looking for. So, this time, we're growing the site carefully, paying attention to how people use it, where they go first and most, and what they ask about in the forums.

What, specifically, do you want to know about our software? Just saying, "do you have plans to be normal" doesn't tell us what about "normal" you wish we were doing. ;-)

--

Check out the forum guidelines!

Sat, 07/04/2009 - 03:20
dayo

Hi

I don't have VM installed right now so will have to wait and see what the docs look like.

As to what I want to know, well, I want to know how it works, what it can do and what cross compatibilities exist such as WHMCS. I also want to know about licensing ... whether I have to buy one license for each server etc. You know, information for the person looking at the site and wondering whether to go for it or not.

Just because business is brisk doesn't mean you don't have to do these things and perhaps you need to bring someone on board to help out with first level queries to free you guys to do the sexy stuff ... like supporting nginx or lighty

Sat, 07/04/2009 - 04:18 (Reply to #3)
Joe
Joe's picture

As to what I want to know, well, I want to know how it works, what it can do and what cross compatibilities exist such as WHMCS.

That'd be up to WHMCS, since the billing system calls the control panel. WHMCS has support for Virtualmin in recent versions. We don't know yet whether Matt will be supporting Cloudmin, but we have high hopes.

I also want to know about licensing ... whether I have to buy one license for each server etc.

I would think a glance at the shop should make this immediately clear? For example, the description of Virtualmin 10 is:

Annual license, support, and software updates subscription for Virtualmin Professional on one server with up to 10 domain accounts.

The licenses are per-server, and priced based on domain limits. So, yes, you have to buy one license for each server (with a few exceptions; we permit one devel/backup server on the same license. This has some restrictions and cannot be used as a world-facing production server...unless/until the primary server is offline for some reason).

Virtualmin GPL has no such limitations, and can be installed on as many machines as you like, and can manage infinite domains. There are a few feature differences (there's an old comparison chart here: http://www.virtualmin.com/compare.html - a new version of that chart will be online shortly).

Just because business is brisk doesn't mean you don't have to do these things and perhaps you need to bring someone on board to help out with first level queries to free you guys to do the sexy stuff ... like supporting nginx or lighty

We hire very carefully, because we'd rather provide really great support to a few thousand people, than mediocre support to a million. I have asked Eric to devote more of his time to Virtualmin (he is an independent contractor who helps out with support and docs and lots of other stuff around here), and I've begun searching for someone to take on the overnight support shift (i.e. someone in Europe, Asia, Australia, or India). This is a cautious search, but we'll find someone. Hiring someone (reading resumes, interviewing, dealing with payroll, legal, etc.) takes time away from development and documentation and support...so, if I stopped everything in order to hire someone, we'd fall even farther behind, at least for a month or so while the new person gets up to speed. This transition is expensive and time-consuming.

Anyway, we were caught off-guard by the sales boost we've seen recently. You just happened to arrive during the couple of weeks where we are way behind on everything, and not really able to do much more about it than we already are. We're moving as fast as we can.

Your desire for alternative web server support has been noted.

--

Check out the forum guidelines!

Sat, 07/04/2009 - 12:11
dayo

Hiring is always tricky especially for a small team.

Good luck.

Sun, 07/12/2009 - 20:15
jamesw

Thanks for this. I was struggling to understand how to run the virtualmin api commands from the user that our rails apps run under and once I had sussed out that I needed to use the remote api I struggled to find anything on the remote api.

Your simple explanation left me with a few headaches though and just in case anyone else wants to not have to go through the pain I did then here is what I had to do to run the remote api on our VPS

I needed to write a script that could be called from an option inside one of our Rails applications on our host (railsplayground.com but I guess this is applicable to all hosting companies)

Because the api will only run as root user and our applications are not running as root I first needed to install an ssl certificate so I could use the HTTPS protocol (I don't want my root password broadcasting all over the net) I did this with a self certified wildcard certificate using openssh.

The guys at Railsplayground enabled the domain for SSL for me as the virtualmin commands wouldn't run to do this but that only took a couple of minuites and they put the certificates I had generated into the right place and made the relevant adjustemnts to the httpd.conf file for me so no pain there.

I then had to work out how to call the virtualmin api from within a command line when logged into my VPS as the user that my apps run under. Now that was a pain

It took me 5 hours to work out that the https://user:pass@domain.tld:10000/virtual-server/remote.cgi?program=cre... command mentioned in the above post needed to be run using a wget command in front of it

wget --no-check-certificate https://user:pass@domain.tld:10000/virtual-server/remote.cgi?program=cre.. did the trick nicely.

Of course if your not bothered about people knowing your root password (and you should be) then you can use http instead of HTTPS.

I didn't go to the trouble of buying an SSL certificate as the functionality I need this for is totally under my control and not used by visitors to the site.

A google search found this http://www.akadia.com/services/ssh_test_certificate.html which was a big help for me and openssh was run from within the command line on our VPS whilst logged in as root although I could have run it from within cygwin on my local windows pc and ftp'd the files accross

When I first tried to run this on the VPS though I got the error that said the domain was not enabled for SLL which was when I got the Railsplayground guys to enable SSL for me.

Total time taken on finding all the info = 10 hours.

With the info I now have here I would be able to do this again in 20 minuites. I hope in some way this info will save someone else the pain I went through!

James

Fri, 12/11/2009 - 19:18
praboy

Hi. I'm getting: ERROR: You are not allowed to run remote commands

<?php
$result = shell_exec("wget -O - --quiet --no-check-certificate 'https://praboy:*PASSWORD*@*MYDOMAIN*:10000/virtual-server/remote.cgi?program=list-domains'");

echo $result;
?>

???