Hey there,

Neo4j's REST API is overall quite awesome and impressive -- it's just such a
great *actual* REST API.

I was just reading into paged traversals (
http://docs.neo4j.org/chunked/stable/rest-api-traverse.html ) and couldn't
help but feel that this isn't the best way to do paging over REST.

I dig that you POST to create a paged traverser, which returns a 201 with a
Location set to the traverser -- the traverser is indeed a real resource on
the server.

But, it caught me off guard that you page by repeatedly GETting the same
resource over and over. In other words, the resource is changing each time
you GET it. Doesn't that violate GET, that state on the server shouldn't be
visibly changed, or that GETting the same resource multiple times should
return that same resource each time?

I've seen other paging APIs return a "next" token in each response, and you
include that token in your next request, either as a header or in the query
string. I've also seen the simple "?page=2" or "/page/2" approach.

This is obviously not a dealbreaker, but it is a limitation -- I have to
remember the results on my end and can't refetch them if e.g. the user
refreshes the page in their browser. That kinda sucks.

What are your guys' thoughts?

Aseem
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to