I am designing a REST like API for paginated data retrieval of a YUI-based client. The REST URL looks like this for a GET request:
/app/catalog/data?startInd
I can't decide whether this is
204
or404
.
Neither. Just return 200
with an empty result (empty XML document or JSON array, whatever you use). Typically I use REST services with paginated views so along with results page I return total number of records. This will help clients to realize the mistake. But technically it is nothing wrong.
Use 204
for DELETE
operations (there's really no content to return) and for PUT
.
BTW (bold mine):
if no parameters are given, all data from DB will be dumped
Believe, you don't want to do this...