MSK Institute LogoMSK.Institute
HomeCourses
Book Free Demo➔Sign In
Free Demo➔
MSK Institute LogoMSK.Institute

Leading computer training academy in Shikohabad for software engineering, Python, web development, and digital literacy.

ISO 9001:2015 Certified Center
Follow & Connect
4.9

Programs & Admissions

  • All CoursesCatalog
  • Learning PathsRoadmaps
  • Student ProjectsShowcase
  • Live Classes & ScheduleLive
  • Upcoming Batches
  • Campuses & LocationsHub
  • Verify Certificates
  • Book Free Demo Class

Resources & Tools

  • Free Online Mock TestsAll Tests
  • NIELIT CCC Mock TestFree
  • Course & Career FinderQuiz
  • Study Material Hub
  • All MSK ToolsHub
  • Keyboard ShortcutsNew
  • TypeQuest Speed LabTyping
  • MSK Code PlaygroundCode
  • Interactive Tutorials
  • Quick Cheatsheets

Institute & Contact

  • About MSK Institute
  • Careers & InternshipsHiring
  • Publications & Blogs
  • Gali No. 3, Near Gyan Jyoti Public School,
    Adarsh Nagar, Shikohabad, Uttar Pradesh 283135
  • +91 83930 42166
  • mskshikohabad@gmail.com
  • Hours:Mon – Sat: 8:00 AM – 7:00 PM | Sun: 10:00 AM – 2:00 PM
  • 4.9 ★(38 Google Reviews)
© 2026 MSK Institute. All rights reserved.•Privacy Policy•Terms of Service•Disclaimer•Contact Us

Shikohabad's Leading Computer & Coding Academy

Home
Courses
Live
Material
RESTful API Design Standards: HTTP Verbs, Status Codes & Idempotency0%
Study Materials
Node.js & Express.jsProgress 0%
1.1Node.js Architecture, V8 Engine & Single-Threaded Event Loop1.2Call Stack, Callback Queue, Microtask Queue & Libuv Workers1.3Non-Blocking Asynchronous Code with Promises and Async/Await
4.1Middleware Pipeline: Application-Level, Router-Level & Third-Party4.2RESTful API Design Standards: HTTP Verbs, Status Codes & Idempotency4.3MVC Architecture: Splitting Routes, Controllers & Service Layers4.4Global Error Handling Middleware & Custom AppError Classes
HomeTutorialsNode.js & Express.jsRESTful API Design Standards: HTTP Verbs, Status Codes & Idempotency
MVC Architecture: Splitting Routes, Controllers & Service Layers

RESTful API Design Standards: HTTP Verbs, Status Codes & Idempotency

Beginner12 min read•Updated: 2026-11-18•By Er. Sumit Kumar (MSK Institute)
Study MaterialsCheatsheet

REST (Representational State Transfer) is the dominant architectural style for designing scalable, maintainable web APIs. Following strict REST conventions ensures predictable, developer-friendly endpoints that conform to international web standards.


1. Resource-Oriented URL Naming Conventions

In REST, URLs represent resources (nouns, not actions/verbs). Use plural nouns and lowercase kebab-case:

Good RESTful Design (Nouns)Bad Anti-Pattern (Verbs in URL)Intent
GET /api/v1/usersGET /api/v1/getAllUsersFetch list of users
POST /api/v1/usersPOST /api/v1/createNewUserCreate a new user
GET /api/v1/users/42GET /api/v1/getUserById?id=42Fetch single user
PATCH /api/v1/users/42POST /api/v1/updateUserPartial update of user
DELETE /api/v1/users/42POST /api/v1/deleteUserDelete user
GET /api/v1/users/42/ordersGET /api/v1/getUserOrders?u=42Nested sub-resource

2. Standard HTTP Status Codes

Using the correct HTTP status code communicates the result unambiguously:

  • 200 OK: Standard successful GET, PUT, or PATCH.
  • 201 Created: Successful POST resulting in a newly created resource.
  • 204 No Content: Successful request with intentionally empty response body (typical for DELETE).
  • 400 Bad Request: Client sent malformed syntax or invalid input payload.
  • 401 Unauthorized: Client is unauthenticated (missing or invalid JWT token).
  • 403 Forbidden: Client is authenticated but lacks permission (e.g. non-admin accessing admin portal).
  • 404 Not Found: Requested resource or endpoint does not exist.
  • 409 Conflict: State conflict (e.g. trying to register with an email that already exists).
  • 422 Unprocessable Entity: Payload is syntactically valid JSON but violates domain rules.
  • 500 Internal Server Error: Unhandled server-side crash or database failure.

3. What is Idempotency?

An HTTP method is idempotent if making the same request multiple times produces the exact same server-side state as making it once.

MethodIdempotent?Safe (Read-Only)?Explanation
GETYesYesReading data never mutates state
HEAD / OPTIONSYesYesMetadata inspection only
PUTYesNoOverwriting an entity 10 times results in identical state
DELETEYesNoDeleting resource ID 5 multiple times leaves it deleted
POSTNoNoCalling POST /orders 5 times creates 5 separate orders
PATCHTypically NoNoIncrement operations (e.g. price += 5) produce different states

Interactive Quiz• Knowledge Check

Multiple Choice Questions

Question 1
Which of the following endpoints strictly adheres to RESTful resource-oriented naming standards?
Question 2
Which HTTP status code should be sent when a user submits a valid login token but does NOT have admin privileges to view the page?
Question 3
What does it mean for an HTTP method to be "idempotent"?
Question 4
Why is HTTP POST classified as non-idempotent?
Question 5
Why should APIs include a version prefix in their path (e.g., /api/v1/products)?

Next Lesson

MVC Architecture: Splitting Routes, Controllers & Service Layers

Continue learning with hands-on practice, examples, and exercises in the upcoming topic.

Related Lessons

Previous LessonNext Lesson
Middleware Pipeline: Application-Level, Router-Level & Third-PartyMVC Architecture: Splitting Routes, Controllers & Service Layers

Practice Quiz

Test your understanding of this lesson with 5 questions. Each question has one correct answer.

Mentor-Led Practical Training

Master Node.js & Express.js with Hands-On Projects

Practice in live mentor-led sessions with real projects, mock tests, and verifiable certification at MSK Institute.

View Full CourseBook Free Demo
PreviousNext
PreviousPrevNext