web services - RESTful Design: Paging Collections -


I am preparing a REP API that requires paging (per x) from the server side.

What is the correct way of the page through any collection of resources:

Option 1:

  received / resource / page /  

Option 2:

  received / resource /? Page = & lt; Pagenr & gt; GET / Resources / Tags / & lt; Tag1>, & lt; Tag 2 & gt ;? Page = & lt; Pagenr & gt; GET / Resources / Search / & lt; Query & gt; Page = & lt; Pagenr & gt;  

If 1, what should I do with GET / Resources? Redirect to / resources / page / 0, reply with some error or answer exactly as / resource / page / 0 without redirecting?

is not the most important part of looking like a URI. What should you think about it, instead how is it presented to the user? For example, a page should have a link on the "Next" page and the second link to the "Previous" page (if any). Take a look at


Comments