XML-RPC via PHP5

3 posts / 0 new
Last post
#1 Mon, 03/02/2009 - 09:53
tpnsolutions
tpnsolutions's picture

XML-RPC via PHP5

Hi,

I was wondering if anyone has played around with the usage of the built in XML-RPC feature within Webmin?

If so, I'm trying to develop a PHP frontend, and would like some assistance working with this.

There seems to be a limited amount of documentation on the topic, so I seem to get lost easily working with it.

What I'd like if possible is a list of commands which can be passed to the "xmlrpc.cgi" script and perhaps the parameters which accompany these.

Thanks guys, hope someone can shed some light on this topic.

-- Best Regards, Peter

Mon, 03/02/2009 - 10:42
andreychek

Hi Peter,

Joe had offered some info on using the various API interfaces with Virtualmin recently... you can see his post here:

http://www.virtualmin.com/forums/help-home-for-newbies/dns-management--remote-http-apicommand-line-api.html#19949

Perhaps that'll get you started -- as he mentions the state of the current xml-rpc documentation, as well as some alternatives.
-Eric

Mon, 03/02/2009 - 12:14 (Reply to #2)
Joe
Joe's picture

There's actually some cool news on the API front going forward. Jamie just started work on a <i>major</i> overhaul of the module system...mainly to reduce memory usage and improve performance, but the side effect is that the web-lib.pl is becoming &quot;WebminCore&quot;, a proper Perl module. I'm not exactly sure what the impact of that will be for the XML-RPC interface, and we're still months away from this trickling down into all modules, but one of the cool changes is the ability to import by name rather than filename (I mentioned &quot;bind8-lib.pl&quot; and such in the message Eric mentioned, but it looks like we'll now be able to load up by module name, &quot;bind8&quot;, without knowing the library name or explicitly having to namespace it). But, I don't actually know that for sure...I just noticed some check-ins Jamie did lately were looking that way.

Anyway, the bad news is that it's <i>not</i> really possible to provide a list of commands to the XML-RPC interface--it's way too huge. We're talking about thousands of functions spread across hundreds of Webmin modules! The API docs are coming along nicely though; when the website overhaul reaches Webmin.com I'll begin work on integrating a POD browser for the Webmin API docs.

If you can tell us what you're trying to build, I can point you in the right direction; I have enough familiarity with the code to point you to the right modules, and show you how to read the POD docs (if the modules have been converted). And, if it's mainly Virtualmin stuff, you don't even need to go the XML-RPC path. You can just make requests of the Virtualmin remote API, which is sort of a REST style interface (a unique URL for each action, results are returned in plain text format...we probably need to offer JSON and XML format output for those, but it's pretty easy to parse, as is). Very easy to use from any programming language that can make web requests or executed commands in the shell, anyway, and very well documented.

--

Check out the forum guidelines!

Topic locked