For the paging I would implement this the way I did this in the useradmin REST 
service. This implementation is quite similar to the page Bram referred to, but 
using Atom syndication links instead of proprietary links for HATEOAS.
Regarding PUT/POST for create/update; PUT requests should be idempotent in 
contrast to POST requests. So a POST to /rest/index/[indexname] could 
potentially create a new index, a PUT can only update an existing entry (if it 
exists). 

Regards, Ivo


-----Original Message-----
From: amdatu-developers-bounces at amdatu.org 
[mailto:[email protected]] On Behalf Of Bram de Kruijff
Sent: maandag 17 januari 2011 15:16
To: amdatu-developers at amdatu.org
Subject: Re: [Amdatu-developers] Search & index REST API

2011/1/17 Marcel Offermans <marcel.offermans at luminis.nl>:
> Hello Mark,
> On 14 Jan 2011, at 16:28 , Mark Machielsen wrote:
>
> For several projects we need an search and index service with a REST
> interface. This needs to be tenantaware service and a tenant may define
> several indices.
>
> We recently agreed on how to handle tenant aware services, so somehow the
> initial request needs to be enough to "extract" the tenant ID. This can be
> for example based on the hostname, but it could also be encoded in the path
> of the URL, so /rest/[tenantID]/index/etc. Right?
>
> Proposal for the REST interface (the index is the resource):
> - GET calls:
> ?- /rest/index/[indexname]/?q=... ?: search in index according to query
>
> Minor detail: I'd remove the trailing '/' to make it:
> /rest/index/[indexname]?q=...
> Question: do we explicitly want to deal with 'paging' in the REST interface
> and if so, how?

Have a look at the Alfresco guidelines for inspiration on paging:
http://wiki.alfresco.com/wiki/Alfresco_REST_Design_Guidelines

grz
Bram

_______________________________________________
Amdatu-developers mailing list
Amdatu-developers at amdatu.org
http://lists.amdatu.org/mailman/listinfo/amdatu-developers

Reply via email to