[rest-practices] Pagination API
Kent Watsen
kwatsen at juniper.net
Thu Jul 22 20:34:05 UTC 2010
ABNF Syntax:
<syntax> = "sortby=(" <attr-list> ")"
<attr-list> = <attribute> ["," <attr-list> ]
<attribute> = *char [ <direction> ]
<direction> = "(" ["ascending" / "descending"] ")"
Notes:
* The <attribute> value encodes a path using periods ('.') relative to the object contained by the
collection. The path can only reference local scalar values; it cannot reference inner-list or
traverse into any referenced object
* "ascending" is the default <direction> value used when one is not specified
Examples:
* sortby=(first-name)
* sortby=(contact-info.email-addr(descending))
* sortby=(status(descending),last-name(ascending))
K.
-----Original Message-----
From: Bryan Kearney [mailto:bkearney at redhat.com]
Sent: Thursday, July 22, 2010 4:29 PM
To: Kent Watsen
Cc: rest-practices
Subject: Re: [rest-practices] Pagination API
Thanks... did you incorporate sorting in this as well?
-- bk
On 07/22/2010 04:08 PM, Kent Watsen wrote:
> ABNF Syntax:
>
> "paging=(" ["start=" 1*DIGIT ","] "limit=" 1*DIGIT ")"
>
> Notes:
>
> * Returns at most "limit" items, starting with the "start" item in the collection
> * "0" is the default<start> value used when none is specified
> * Paging is over live data; elements may shift over the course of multiple requests
>
> Examples:
>
> * paging=(limit=25)
> * paging=(start=0,limit=25)
>
> K.
>
>
> -----Original Message-----
> From: rest-practices-bounces at redhat.com [mailto:rest-practices-bounces at redhat.com] On Behalf Of Bryan Kearney
> Sent: Thursday, July 22, 2010 2:43 PM
> To: rest-practices
> Subject: [rest-practices] Pagination API
>
> We are starting to look at adding pagination to our collection. I wanted
> to know if anyone has a set of query parameters they have already made
> use of to overlay pagination onto an api.
>
> Thanks!
>
> -- bk
>
> _______________________________________________
> rest-practices mailing list
> rest-practices at redhat.com
> https://www.redhat.com/mailman/listinfo/rest-practices
More information about the rest-practices
mailing list