[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Web services revisited
- Subject: Re: Web services revisited
- From: John Locke <..hidden..>
- Date: Tue, 22 May 2012 12:27:07 -0700
Hi, Chris,
One forgotten method, on the object controllers, realized on IRC:
On 05/21/2012 04:44 AM, Chris Travers wrote:
Each top-level class would need to provide the following methods:
* GET, POST, DELETE, and PUT would handle cases where no resourcetype
is present. Typically this would be search, retrieve, or post
routines.
* One method for each resourcetype, suffixed optionally with _GET,
_POST, _DELETE, or _PUT. If a suffixed method does not exist, the
resourcetype name would be used as the method name.
... We need an INDEX handler.
GET would presumably get an individual resource, using an internal id
guaranteed to be unique. Index would return a collection of resources,
and would accept a variety of search parameters, presumably sent via GET
parameters.
The Index handler should get called when a request comes in via GET,
with no unique identifier in the URL.
This would also apply to resourcetype sub-handlers...
e.g. possible GET handler:
GET /rest/1.0/my_company/ar_transactions/43353
Possible Index handler:
GET /rest/1.0/my_company/ar_transactions/?invoice_id=N499216
GET
/rest/1.0/my_company/ar_transactions/?status=open,closed&customer=customer1
Cheers,
John Locke
http://www.freelock.com