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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:16:32+00:00 2026-06-14T17:16:32+00:00

I am just starting to learn how to design/write RESTful APIs. I have a

  • 0

I am just starting to learn how to design/write RESTful APIs. I have a general question:

Assume I have some sort of simple SQL database and I’m writing an API that allows to create a new record, view records, delete a record or update a record.

Assuming I want to delete a record, is it usually better to pass in the ID of the record in the URL, for example, /api/delete_record?id=10, or is it better to do something like:

/api/record and have it accept GET, POST, PATCH and DELETE, and the data is handled through the JSON body in the request.

I’ve written a small API using Flask in Python and what I have is just one URL: /record which accepts all the above HTTP methods. It looks at the method in the request and expects the request body in JSON accordingly. Is that considered good or bad practice?

Any suggestions would be greatly appreciated. Please note that I am still very new to all of this. I’ve worked with APIs before but I’ve never developed any. Thanks!

  • 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-14T17:16:33+00:00Added an answer on June 14, 2026 at 5:16 pm

    The proper RESTful way of deleting a resource is to send a DELETE request, and put the scoping information in the URI (not the body), like /api/records?id=10 or /api/records/10. The method information should be in the HTTP method, not the URI.

    I suggest you read “RESTful web services” to learn the best practices on API design.

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

Sidebar

Related Questions

I'm just starting to learn T-SQL and could use some help in understanding what's
I am just starting to learn Python, but I have already run into some
I'm just starting to learn javascript, so this is likely a pretty simple question.
I am just starting to learn Ruby on Rails and have a newbie question
I am just starting to learn design patterns and I have two questions related
I am just starting to learn jQuery and have gotten some of the basic
I am just starting to learn how to use RMI, and I have a
I'm just starting to learn AspectJ, and I have use-case for say, User login.
i'm just starting to learn about database design. For my first project I made
I'm just starting to learn more advanced SQL along with PHP and I'm really

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.