[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XML API for LegerSMB

On Tuesday 26 September 2006 14:12, Christopher Murtagh wrote:
> On 9/26/06, Tony Fraser <..hidden..> wrote:

> - There are a couple of ways of using XML and accepting POs (for
> example). Three that I can think of off the top of my head are (in
> decreasing complexity): 1) SOAP 2) XML-RPC or 3) a simple HTTP POST of
> an XML PO.  For the purposes of LedgerSMB, these methods differ
> [ ... ]
> department. The HTTP POST of an XML document is by far the simplest
> thing to code, but other than accepting XML it isn't really a
> standard.

If we decide against SOAP or XML-RPC, a  RESTful api with  XML documents would 
be really nice:

POST http://foo/ledger-smb/rest.pl/invoice
GET http://foo/ledger-smb/rest.pl/invoice/12345
POST http://foo/ledger-smb/rest.pl/salesorder
PUT http://foo/ledger-smb/rest.pl/salesorder
DELETE http://foo/ledger-smb/rest.pl/invoice/12345
403: Forbidden (or reverses reverses the invoice, and returns the new invoice 
GET http://foo/ledger-smb/rest.pl/customer/foo

PUT http://foo/ledger-smb/rest.pl/customer/foo
 <Company>Foo Widget Corp</Company>

This kind of API makes shell scripting the system trivial

My only gripe about SOAP, is there is a lot of overhead, and it emphasizes a 
method based interface to your data, whereas REST emphasizes a 
document-centric API.


Google for 'REST' for more information ...