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 4100810
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:36:55+00:00 2026-05-20T20:36:55+00:00

I am bolting a REST interface on to an existing application and I’m curious

  • 0

I am bolting a REST interface on to an existing application and I’m curious about what the most appropriate solution is to deal with resources that would return an exorbitant amount of data if they were to be retrieved.

The application is an existing timesheet system and one of the resources is a set of a user’s “Time Slots”.
An example URI for these resources is:

/users/44/timeslots/

I have read a lot of questions that relate to how to provide the filtering for this resource to retrieve a subset and I already have a solution for that.

I want to know how (or if) I should deal with the situation that issuing a GET on the URI above would return megabytes of data from tens or hundreds of thousands of rows and would take a fair amount of server resource to actually respond in the first place.

  • Is there an HTTP response that is used by convention in these situations?
    I found HTTP code 413 which relates to a Request entity that is too large, but not one that would be appropriate for when the Response entity would be too large
  • Is there an alternative convention for limiting the response or telling the client that this is a silly request?
  • Should I simply let the server comply with this massive request?

EDIT: To be clear, I have filtering and splitting of the resource implemented and have considered pagination on other large collection resources. I want to respond appropriately to requests which don’t make sense (and have obviously been requested by a client constructing a URI).

  • 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-05-20T20:36:55+00:00Added an answer on May 20, 2026 at 8:36 pm

    You are free to design your URIs as you want encoding any concept.

    So, depending on your users (humans/machines) you can use that as a split on a conceptual level based on your problem space or domain. As you mentioned you probably have something like this:

    /users/44/timeslots/afternoon
    /users/44/timeslots/offshift
    /users/44/timeslots/hours/1
    /users/44/timeslots/hours/1
    /users/44/timeslots/UTC1624
    

    Once can also limit by the ideas/concepts as above. You filter more by adding queries /users/44/timeslots?day=weekdays&dow=mon

    Making use or concept and filters like this will naturally limit the response size. But you need to try design your API not go get into that situation. If your client misbehaves, give it a 400 Bad Request. If something goes wrong on your server side use a 5XX code.

    Make use of one of the tools of REST – hypermedia and links (See also HATEOAS) Link to the next part of your hypermedia, make use of “chunk like concepts” that your domain understands (pages, time-slots). No need to download megabytes which also not good for caching which impacts scalability/speed.

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

Sidebar

Related Questions

I am creating an android that acts as a media center. I would like
I want to create an application that's automatically run after booting the machine. Can
As the title states, I am looking for something, that will help me automate
I'm interested in writing software that runs with as little booting as possible. What
MBPro:shovell myname$ ruby script/server => Booting WEBrick => Rails 2.3.8 application starting on http://0.0.0.0:3000
I want to make an application which has auto start option in its settings.
I have a faulty hard drive that works intermittently. After cold booting, I can
I'm trying to use the new Sidekiq gem in my rails application but when
I would like to create a landing page consisting only of links. The links
trying to start WEBrick: rails s => Booting WEBrick => Rails 3.1.1 application starting

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.