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

  • Home
  • SEARCH
  • 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 8471309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:45:42+00:00 2026-06-10T16:45:42+00:00

Pretty new to all this REST stuff. I’m designing my API, and am not

  • 0

Pretty new to all this REST stuff.

I’m designing my API, and am not sure what I’m supposed to return from a search query. I was assuming I would just return all objects that match the query in their entirety, but after reading up a bit about HATEOAS I am thinking I should be returning a list of URI’s instead?

I can see that this could help with caching of items, but I’m worried that there will be a lot of overhead generated by the subsequent multiple HTTP requests required to get the actual object info.

Am I misunderstanding? Is it acceptable to return object instances instead or URIs?

  • 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-10T16:45:43+00:00Added an answer on June 10, 2026 at 4:45 pm

    IMHO it is important to always remember that “pure REST” and “real world REST” are two quite different beasts.

    How are you returning the list of URIs from your query in the first place? If you return e.g. application/json, this certainly does not tell the client how it is supposed to interpret the content; therefore, the interaction is already being driven by out-of-band information (the client magically already knows where to look for the data it needs) in conflict with HATEOAS.

    So, to answer your question: I find it quite acceptable to return object instances instead of URIs — but be careful because in the general case this means you are generating all this data without knowing if the client is even going to use it. That’s why you will see a hybrid approach quite often: the object instances are not full objects (i.e. a portion of the information the server has is not returned), but they do contain a unique identifier that allows the client to fetch the full representation of selected objects if it chooses to do so.

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

Sidebar

Related Questions

i am pretty new to all this Monodroid stuff. I am porting my Windows
OK, I'm pretty new to this, and ploughing through all the tutorials and answered
I'm new to Ruby on Rails and I'm sure this question is pretty stupid,
I'm new to REST and this sounds like it should be pretty simple. In
Pretty new to all this so excuse any beginner mistakes. I was wondering if
(I am pretty new to all this.) I have a page where the user
First of all sorry for my bad english and Im pretty new in these
I'm pretty new to using MVC3 so hopefully the terms I'm using are all
I'm pretty new to Javascript, Rails and JQuery all working together. I'm going through
all. I'm pretty new to C++, and I'm writing a small library (mostly for

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.