flask-mongorest icon indicating copy to clipboard operation
flask-mongorest copied to clipboard

add 'pagination': { 'next': <url> } to List requests in MongoRest

Open philfreo opened this issue 13 years ago • 2 comments

philfreo avatar Sep 05 '12 03:09 philfreo

I think HAL (or any of the many JSON hypermedia formats out there, like Siren) would be a good way to "standardize" this kind of thing. Even better (and I'm working on this in #27) would be to be able to response to requests in all of those formats automatically. In other words, write code so that if the client wants HAL, they add an "Accept: application/hal+json" to their request, and they get HAL. But they could also ask for Siren, Collection+JSON, hm-JSON, etc and they'd get their response in those formats. I think you could support all of these formats "out fo the box".

xogeny avatar Mar 04 '13 20:03 xogeny

This seems like a good approach:

http://www.vinaysahni.com/best-practices-for-a-pragmatic-restful-api?hn#pagination

philfreo avatar Jun 04 '13 15:06 philfreo