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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:15:11+00:00 2026-06-05T12:15:11+00:00

I am designing a Restful HTTP API and have a design question. In my

  • 0

I am designing a Restful HTTP API and have a design question.

In my application users should be able to suggest item creations.

Then I can either approve or disapprove them.

I wonder what the best VERB+URL pattern for this would be.

Example 1:

POST|GET|PUT|DELETE /items

A user POST a new item and I can either PUT it to “approved” from “pending” or DELETE it.

Here I must use GET /items?status=approved to get all approved items and GET /items?status=pending to get all pending items. Perhaps GET /items would get me all the approved ones by default.

But I don’t get how I can prevent users from PUTting it to approved state.

or

Example 2:

POST|GET|PUT|DELETE /item_creation_suggestions

A user POST a new item suggestion and I can either approve by DELETE:ting it and do a POST /items or just DELETE it.

Here /items and /item_creation_suggestions are two separate collections. I just have to delete the suggestions and create the items when approving.

This makes it simple to protect my app from unauthorized access. I can just protect my /items with authorization, while /item_creation_suggestions could be used by anyone.

But this doesn’t seem very Restful?

The same goes for when users are suggesting items updates and deletions and I either approve or disapprove them.

I am very new at Restful design so all feedback and suggestions would be appreciated!

  • 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-05T12:15:13+00:00Added an answer on June 5, 2026 at 12:15 pm

    The first one sounds good.

    POST /items should create a new item and probably return a 202 Accepted status.
    GET /items should return all approved items.
    GET /items?status=pending should return pending items to users with the right permission.
    PUT /items/[id] with a request body that designates a new status to change the status.
    DELETE /items/[id] to delete the item.

    In the end you need to decide what makes the most sense for your API, but the above sounds generally reasonable.

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

Sidebar

Related Questions

I am designing a restful HTTP API for my application. The app has Categories
I am designing a RESTful API for a booking application and was quite happy
I am designing an RESTful API for our product and have encountered the need
I am designing a RESTful API and am using the usual HTTP status codes
I'm designing a RESTful API that should handle binary file uploads. Should this be
Designing my RESTful API, I would like use following URI http://[HOST]/[PLANET]/[LAT];[LONG] e.g. http://myserver/earth/50.2;29.1 What
We are currently working on the design of a RESTful application. We have decided
I am designing RESTful Api's and would like some advice on designing an API
I am designing a RESTful API and I would like to know what the
I'm currently (I try to) designing a RESTful API for a social network. But

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.