Paging in the REST-api

Jiri Kremser jkremser at redhat.com
Tue Feb 19 16:45:28 UTC 2013


Hi,
  this is maybe off-topic, but when I was working on librarian projects there was a protocol called OAI-PMH [1] used for harvesting large amount of metadata across various institutions. It is HTTP, I would say URL-based, protocol. And they used a feature called resumptionToken. I.e. user sends first request saying he wants all records, he gets first N records and resumptionToken. After processing the first N records, she can request more. To do so, she have to provide this resumptionToken in the next request, in response she gets data and another resumptionToken, and so on. The resumptionToken may expire. It implies some state being hold on the server side though (not RESTy at all).

[1]: http://www.openarchives.org/OAI/openarchivesprotocol.html#FlowControl

jk

----- Original Message -----
> From: "Heiko W.Rupp" <hrupp at redhat.com>
> To: "rhq-devel" <rhq-devel at lists.fedorahosted.org>
> Sent: Tuesday, February 19, 2013 11:35:59 AM
> Subject: Paging in the REST-api
> 
> Hi,
> 
> as I am implementing paging through (large) collections - e.g. lists
> of resources,
> I am investigating options. For this I have written a blog post at
> http://pilhuhn.blogspot.com/2013/02/best-practice-for-paging-in-restful-apis.html
> 
> My current tendency is to support the "Link: header" style and
> possibly
> with the multiple Link: headers style
> 
> 
> --
> Reg. Adresse: Red Hat GmbH, Technopark II, Haus C,
> Werner-von-Siemens-Ring 14, D-85630 Grasbrunn
> Handelsregister: Amtsgericht München HRB 153243
> Geschaeftsführer:  Mark Hegarty, Charlie Peters, Michael Cunningham,
> Charles Cachera
> 
> 
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
>


More information about the rhq-devel mailing list