pagination - REST status code 204 on paginated result -


I am designing a REST-like API for retrieving paged data from a YUI-based client. The REST URL looks for a GET request like this:

  / app / catalog / data? StartIndex = & lt; Int & gt; & Amp; Results = & lt; Int & gt; & Sort = & lt; Sting & gt; & Amp; Dir = & lt; String & gt;   

All parameters are optional, i.e. if no parameter is given, then all data of DB will be dumped. Now to say that there are only 1000 records in the database, the following has been confirmed:

  / app / catalog / data? StartIndex = 1100 and the result = 25   

The page is page-free from the database, though the request was ok?! I can not decide whether it is 204 or 404 .

The media types produced are JSON and CSV.

I would say that 204 is the most appropriate request was not successful, not just results.

  10.2.5 204 No content server has completed the request, but there is no need to return any body-body, and update metename.   

Looks OK like the case.

Comments