[Ovirt-devel] OVirt public API

Daniel P. Berrange berrange at redhat.com
Wed Jul 16 20:21:22 UTC 2008


On Wed, Jul 16, 2008 at 09:57:46AM -0700, David Lutterkort wrote:
> On Wed, 2008-07-16 at 08:53 -0400, Hugh O. Brock wrote:
> > > Besides being lightweight, a RESTful API is also very attractive because
> > > of the support for it in Rails 2 (ActionController::Resources on the
> > > server side, and ActiveResource for clients) That support takes away a
> > > lot of the headaches around serialization of objects, routing etc.
> > 
> > I like the REST concept, especially the fact that it will leverage the
> > model code we already have in oVirt. However, I would very much like
> > to have a command line interface (oVirsh?) to go along with the
> > API. Does that seem doable on top of a REST API? XML-RPC I assume is
> > covered if we use XML to serialize data.
> 
> That's a very important point: a RESTful API does not give you an
> XML-RPC API, it's two completly different styles of API. With the
> support built into Rails, it's relatively easy to change the way objects
> get (de)serialized, but that still doesn't give you XML-RPC.

As a point of reference, Flickr provides XMLRPC, REST *and* SOAP
at once. Obviously they're fairly different in the way they encoded
requests parameters, but in all three cases the responses are just 
an embedded XML document containing the result or error code. So its
pretty clear they have some nice generic servlet, and a way to bridge
this to all three API styles, so they only write the server side stuff
once and get all three APIs. 

I've no idea how you're anticipating doing the server side coding for
the API, but if there was a way todo it such that the Ruby impl of
the APIs didn't have any direct knowledge of REST, we could add in
other API styles later.

http://www.flickr.com/services/api/

In particular:

 REST
    http://www.flickr.com/services/api/request.rest.html
    http://www.flickr.com/services/api/response.rest.html

 XMLRPC

    http://www.flickr.com/services/api/request.xmlrpc.html
    http://www.flickr.com/services/api/response.xmlrpc.html

 SOAP

    http://www.flickr.com/services/api/request.soap.html
    http://www.flickr.com/services/api/response.soap.html

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the ovirt-devel mailing list