[aerogear-dev] Specification for query RESTFul resources using offset, limit & total

Matthias Wessendorf matzew at apache.org
Tue Jan 15 00:46:58 EST 2013


On Mon, Jan 14, 2013 at 8:57 PM, Bruno Oliveira <bruno at abstractj.org> wrote:

>  +1 or -1. Concerns? Perl is handy, but I don't use it. :)
>
>
I'd vote to keep these convenient headers




>
> --
> "The measure of a man is what he does with power" - Plato
> -
> @abstractj
> -
> Volenti Nihil Difficile
>
> On Monday, January 14, 2013 at 5:05 PM, Matthias Wessendorf wrote:
>
>
>
> On Mon, Jan 14, 2013 at 8:00 PM, Bruno Oliveira <bruno at abstractj.org>wrote:
>
>  Morning everybody.
>
> Daniel has already implemented a lot of cool stuff on AeroGear controller
> for pagination. For this reason I created this Jira to see if the
> implementation matches our expectations on the client side (
> https://issues.jboss.org/browse/AEROGEAR-814).
>
> For example, currently the headers are returning something like it:
>
> HTTP/1.1 200 OK
> Content-Type: application/json;charset=UTF-8
> Content-Length: 160
> AG-Paging-Offset: 0
> AG-Paging-Limit: 4
> AG-Paging-Total: 4
> AG-Links-Next: cars?offset=1&limit=4
> AG-Links-Last: cars?offset=3&limit=4
> [
>   {"color":"Green","brand":"Audi","id":1},
>   {"color":"White","brand":"Audi","id":2},
>   {"color":"Black","brand":"Audi","id":3},
>   {"color":"Black","brand":"BMW","id":4}
> ]
>
> <https://gist.github.com/4500336#getting-the-next-page-of-cars>
>
> Question, do we really need AG-Links-Next and AG-Links-Last. If I know
> about the total and I have the fields limit and offset, looks like 'Next'
> and 'Last' are useless.
>
>
>
> Hrm - they look pretty handy
>
> -M
>
>
>
>
>  Am I wrong? I was wondering about something like this
> http://www.redmine.org/projects/redmine/wiki/Rest_api#Collection-resources-and-pagination
>
>
> --
> "The measure of a man is what he does with power" - Plato
> -
> @abstractj
> -
> Volenti Nihil Difficile
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
>


-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20130115/d9e6293d/attachment-0001.html 


More information about the aerogear-dev mailing list