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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:16:40+00:00 2026-05-19T04:16:40+00:00

I’m designing a REST API. The part I’m working on now involves simply reading

  • 0

I’m designing a REST API. The part I’m working on now involves simply reading objects in the form of JSON data off of the server and modifying them.

The resource that I am thinking of using for this looks like:
/data/{table name}/{row key}

I would like to allow GET and PUT operations on this resource.

The question that I am wrestling with is that I would like to return other data along with the JSON object such as customer messages, the amount of time it took for the round trip to the data base, etc… I would also like to allow for sending query arguments with the payload in cases where the URL would be too long if they were included there.


So the resources would work like this:

GET

GET /data/{table name}/{row key}

Server returns:

{
   data:{...JSON OBJECT GOES HERE ....},
   message:"customer messages go here",
   responseTime:'123ms',
   otherInfo:"Yada yada yada;
}

PUT

PUT GET /data/{table name}/{row key}

Client sends as payload:

{
   data:{...JSON object goes here...},
   queryArguments:{...extra long query arguments go here...}
}

I’m afraid this might violate the rules for proper RESTful GET and PUT resources because what you are sending to the server is not exactly what you are getting back out since other information is being included in the payloads. I’d rather not have every operation be a POST as a remedy.

Am I being too much of a stickler with this? Is there some other way I should be structuring this?

Thanks!

Edit::::

I should note that in the resource: /data/{table name}/{row key}, I used ‘table name’ and ‘row key’ for simplicity. This is for use with a noSQL database. This resource is intended to work similar to Amazon S3. “uuid” would actually be a better description than ‘row key’.

  • 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-19T04:16:40+00:00Added an answer on May 19, 2026 at 4:16 am

    I see nothing wrong with your approach.
    But if I was implementing this scenario, I would have asked myself the following questions:

    1. Who is my resource?
    2. Is customer message part of the resource?
    3. Is “response time” is part of the resource?

    Let’s take as an example “response time”. If it’s part of your resource, your approach is perfect and nothing else should be done.
    However, if it’s not part of the resource, return it as a HTTP header. Fair enough.

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

Sidebar

Related Questions

No related questions found

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.