Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8198061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:52:18+00:00 2026-06-07T05:52:18+00:00

I am designing a REST like API for paginated data retrieval of a YUI-based

  • 0

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?startIndex=<int>&results=<int>&sort=<sting>&dir=<string>

All parameters are optional, i.e. if no parameters are given, all data from DB will be dumped.
Now say that there are only 1000 records in the database. Following reqeust is made:

/app/catalog/data?startIndex=1100&results=25

What status code should I return if the paginated result from the database remains empty though the request was fine?! I can’t decide whether this is 204 or 404.

The produced media types are JSON and CSV.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:52:19+00:00Added an answer on June 7, 2026 at 5:52 am

    I would say 204 is most appropriate. The request was successful, just with no results.

    10.2.5 204 No Content
    
    The server has fulfilled the request but does not need to return an entity-body, and might want to return updated metainformation.
    

    Sounds exactly like the case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm implementing an API using authentication based on this article: http://www.thebuzzmedia.com/designing-a-secure-rest-api-without-oauth-authentication/ And this related
I am designing a rails rest API that I would like to expose either
I'm designing a REST API, and I would like to know the proper way
I've been reading this: http://www.thebuzzmedia.com/designing-a-secure-rest-api-without-oauth-authentication/ It's been a really great article. One problem I'm
I'm designing a REST API. What response should a server send to mean I've
I am designing a REST api for one of my applications & considering using
I'm working on designing a REST API that can respond with a variety of
I'm designing a REST API. The part I'm working on now involves simply reading
I am having a bit of difficulty designing a url for a rest service
I would like to generate useful documentation for a REST API written in Python.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.