Most REST APIs aren't actually REST. They're just HTTP with JSON. After years of building Java-based REST services, I've seen this pattern more times than I can count — endpoints that call themselves "RESTful" but don't go beyond basic HTTP calls. That's where the Richardson Maturity Model (RMM) becomes a real eye-opener. Leonard Richardson broke REST maturity into 4 levels: 🔹 Level 0 — The Swamp of POX One endpoint, one HTTP method (usually POST), everything tunneled through it. Think old-school SOAP services. No real REST here. 🔹 Level 1 — Resources You start modeling your domain as resources (/orders, /users). But you're still not leveraging HTTP properly. 🔹 Level 2 — HTTP Verbs Now you're using GET, POST, PUT, DELETE meaningfully. Status codes like 201, 404, 409 are used correctly. This is where most production Java APIs live — and where many teams stop. 🔹 Level 3 — HATEOAS Hypermedia as the Engine of Application State. Responses include links that tell the client what it can do next. The API becomes self-discoverable. In Spring, this is achievable with Spring HATEOAS out of the box. The honest truth from the field: Most enterprise systems sit comfortably at Level 2 — and that's often good enough. But understanding Level 3 makes you design better APIs even if you don't fully implement HATEOAS. It forces you to think: "What can the client do after this response?" That mindset shift alone has improved how I design resource relationships, pagination links, and error responses in every Java project I've worked on. Where does your API sit on the RMM? Drop a level below 👇 #Java #RestAPI #SpringBoot #SoftwareEngineering #APIDesign #BackendDevelopment #HATEOAS #WebServices #JavaDeveloper #CleanCode
REST API Maturity Levels: Richardson Maturity Model
More Relevant Posts
-
Ever wondered why your API sometimes screams at you with random 3-digit numbers? Let me simplify this for you. HTTP Status Codes — the language your server speaks when it cannot talk to you directly. Every backend dev who skips learning these properly ends up googling them at 2 AM during production incidents. Do not be that person. Here is what those numbers actually mean: → 2xx — Everything went well Server received your request. Processed it. Sent back the goods. → 200 OK — classic success → 201 Created — you built something new on the server → 202 Accepted — request is in, but processing is still happening Know which one to return in your REST APIs. They are NOT interchangeable. → 3xx — You are being redirected The resource moved. Server is politely pointing you elsewhere. → 301 = gone forever, update your bookmarks → 302 = temporarily elsewhere, come back later → 304 = nothing changed, use your cached version This is where SEO and API versioning decisions live. → 4xx — You made a mistake Stop blaming the server. The problem is on the client side. → 400 = your request is malformed → 401 = prove who you are first → 403 = I know who you are, but you cannot enter → 404 = this thing does not exist → 405 = wrong HTTP method, read the docs → 408 = you took too long, connection dropped Most debugging time in backend dev lives right here. → 5xx — The server made a mistake Now it is not your code. It is the infrastructure sweating. → 500 = something broke on the server, no specifics → 501 = this feature is not built yet → 502 = bad response from an upstream server → 503 = server is overwhelmed or down → 504 = upstream server took too long to respond This is the category that triggers incident alerts and ruins weekends. 18 status codes. One cheat sheet. Zero excuses for not knowing these. Whether you are building REST APIs, debugging microservices, or just cracking Java backend interviews - these codes come up everywhere. Screenshot this. Pin it somewhere visible. You will need it sooner than you think. Comment HTTP and I'll DM you the full HTTP Status Codes PDF → completely free. Follow Narendra K. for more Java | Backend Development | DSA content delivered straight to your feed. #HTTPStatusCodes #BackendDevelopment #Java #SpringBoot #SystemDesign #SoftwareEngineering #DSA #WebDevelopment #JavaDeveloper #CodingTips
To view or add a comment, sign in
-
-
🚀 Day 44 – SpringBoot Validations This is one of those topics that looks simple… but directly impacts API quality, security, and production stability. What most beginners do (Manual Validation) 🔸 Write if-else checks in controller 🔸 Mix validation with business logic 🔸 Duplicate code everywhere 🔸 Poor error handling What professionals do (Spring Boot Validation) 🔸 Use annotations like @NotBlank, @Email 🔸 Add @Valid in controller → auto validation 🔸 Validation separate from business logic 🔸 Handle errors globally using @RestControllerAdvice Most Important Annotations (Must Know) 🔹 @NotNull → cannot be null 🔹 @NotEmpty → not null + not empty 🔹 @NotBlank → no null, empty, spaces 🔹 @Size → length control 🔹 @Email → valid format check 🔹 @Pattern → custom regex validation 🔹 @Min / @Max → numeric limits 🔹 @Positive → value > 0 ⚠️ Common Mistake (Interview Favorite) Difference most people get wrong: 🔸 @NotNull → allows "" and " " 🔸 @NotEmpty → blocks "" but allows " " 🔸 @NotBlank → blocks everything invalid ✅ Always use @NotBlank for Strings I’ve created a complete visual + hands-on document covering: ✔ Manual vs Annotation-based validation ✔ Step-by-step User API validation ✔ Valid & Invalid request cases ✔ Global Exception Handling ✔ All annotations with examples 📄 Worth going through once if you're serious about backend Repost 🔁 if this helps someone learning Spring Boot Follow Surya Mahesh Kolisetty for more backend deep dives #SpringBoot #Java #BackendDevelopment #API #Validation #Hibernate #SoftwareEngineering #Coding #InterviewPreparation #Developers #LearnInPublic #CFBR #Development #SystemDesign #CodingPractices
To view or add a comment, sign in
-
🚀 Understanding HTTP Status Codes in REST APIs While building APIs, one important thing is not just sending data… 👉 It’s also about sending the right response status. These are called HTTP Status Codes. They help the client understand what happened with the request. 🔹 Common Status Codes ✔ 200 – OK Request was successful Example: Data fetched successfully ✔ 201 – Created New resource created Example: User registered successfully ✔ 400 – Bad Request Invalid input from client Example: Missing or wrong data ✔ 404 – Not Found Requested resource not found Example: User ID does not exist ✔ 500 – Internal Server Error Something went wrong on the server 🔹 Example in Spring Boot @GetMapping("/users/{id}") public ResponseEntity<User> getUser(@PathVariable Long id) { User user = userService.findById(id); return ResponseEntity.ok(user); } If user is not found, we can return: return ResponseEntity.status(HttpStatus.NOT_FOUND).build(); 💡 Why Status Codes are important ✔ Help frontend understand response ✔ Improve API communication ✔ Make APIs more professional ✔ Very common in interviews Understanding status codes helped me connect concepts like exception handling, validation, and API design. #Java #SpringBoot #BackendDevelopment #APIDesign #Learning
To view or add a comment, sign in
-
-
APIs started making sense to me when I stopped memorizing… and started understanding the flow 👇 At a basic level, an API is just a way for systems to communicate. But what actually happens when you hit an API? Let’s break it down: 1️⃣ Client sends a request Example: GET /users/1 2️⃣ Request reaches the server → Routed to the correct controller 3️⃣ Business logic runs → Service layer processes the request 4️⃣ Database interaction → Fetch / update data 5️⃣ Response is returned → Usually JSON So the real flow is: 👉 Client → Controller → Service → Database → Response What helped me most was understanding this: • APIs are not just endpoints • They are structured layers working together Also, things started clicking when I focused on: • HTTP methods (GET, POST, PUT, DELETE) • Status codes (200, 404, 500) • Request & response structure Still learning, but understanding this flow made backend development much clearer. If you're learning APIs, focus on the flow — not just the syntax. #BackendDevelopment #APIs #Java #SpringBoot #WebDevelopment #Developers #LearningInPublic
To view or add a comment, sign in
-
-
Ever wondered why your API sometimes screams at you with random 3-digit numbers? Let me simplify this for you. HTTP Status Codes — the language your server speaks when it cannot talk to you directly. Every backend dev who skips learning these properly ends up googling them at 2 AM during production incidents. Do not be that person. Here is what those numbers actually mean: → 2xx — Everything went well Server received your request. Processed it. Sent back the goods. → 200 OK — classic success → 201 Created — you built something new on the server → 202 Accepted — request is in, but processing is still happening Know which one to return in your REST APIs. They are NOT interchangeable. → 3xx — You are being redirected The resource moved. Server is politely pointing you elsewhere. → 301 = gone forever, update your bookmarks → 302 = temporarily elsewhere, come back later → 304 = nothing changed, use your cached version This is where SEO and API versioning decisions live. → 4xx — You made a mistake Stop blaming the server. The problem is on the client side. → 400 = your request is malformed → 401 = prove who you are first → 403 = I know who you are, but you cannot enter → 404 = this thing does not exist → 405 = wrong HTTP method, read the docs → 408 = you took too long, connection dropped Most debugging time in backend dev lives right here. → 5xx — The server made a mistake Now it is not your code. It is the infrastructure sweating. → 500 = something broke on the server, no specifics → 501 = this feature is not built yet → 502 = bad response from an upstream server → 503 = server is overwhelmed or down → 504 = upstream server took too long to respond This is the category that triggers incident alerts and ruins weekends. 18 status codes. One cheat sheet. Zero excuses for not knowing these. Whether you are building REST APIs, debugging microservices, or just cracking Java backend interviews - these codes come up everywhere. Screenshot this. Pin it somewhere visible. You will need it sooner than you think #HTTPStatusCodes #BackendDevelopment #Java #SpringBoot #SystemDesign #SoftwareEngineering #DSA #WebDevelopment #JavaDeveloper #CodingTips
To view or add a comment, sign in
-
-
Most APIs function correctly, but very few are designed well Swipe to understand what good REST API design actually involves Early on, I approached APIs as simple CRUD implementations define endpoints, connect services, and move on Over time, it became clear that building scalable systems requires more than that This breakdown highlights key aspects that often get overlooked • Applying REST principles beyond basic implementation • Choosing the right HTTP methods based on intent • Structuring resources in a clear and consistent way • Using status codes and headers effectively • Considering authentication, caching, and rate limiting from the start The shift from writing endpoints to designing systems changes how backend development is approached What aspects of API design have been the most challenging in your experience #BackendDevelopment #Java #SpringBoot #RESTAPI #SoftwareEngineering #SystemDesign #JavaDeveloper
To view or add a comment, sign in
-
-
In production Spring Boot services, scattered try-catch blocks create inconsistent API behavior. A better approach is centralized handling: ```@RestControllerAdvice public class GlobalExceptionHandler { @ExceptionHandler(ResourceNotFoundException.class) public ResponseEntity<ErrorResponse> handleNotFound(ResourceNotFoundException ex) { return ResponseEntity.status(HttpStatus.NOT_FOUND) .body(new ErrorResponse("RESOURCE_NOT_FOUND", ex.getMessage())); } @ExceptionHandler(MethodArgumentNotValidException.class) public ResponseEntity<ErrorResponse> handleValidation(MethodArgumentNotValidException ex) { return ResponseEntity.status(HttpStatus.BAD_REQUEST) .body(new ErrorResponse("VALIDATION_ERROR", "Invalid request payload")); } @ExceptionHandler(Exception.class) public ResponseEntity<ErrorResponse> handleGeneric(Exception ex) { return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) .body(new ErrorResponse("INTERNAL_ERROR", "Unexpected error occurred")); } }``` Benefits we observed: - Consistent contract for error payloads - Cleaner controllers/services - Accurate HTTP semantics (400, 404, 409, 500) - Better observability and incident response A strong error model is part of API design, not just exception handling. #SpringBoot #Java #Microservices #API #SoftwareEngineering #Backend
To view or add a comment, sign in
-
What is an API? What is REST? What is RESTful API? Have a go at a beginners overview I wrote.
To view or add a comment, sign in
-
🚀 Spring Boot – User API Upgrade (Full CRUD) Took my mini project to the next level by implementing complete CRUD operations in Spring Boot. 🧠 What I added: ✔️ GET "/users" → Fetch all users ✔️ PUT "/user/{id}" → Update user ✔️ DELETE "/user/{id}" → Delete user 💡 Now the API supports full lifecycle operations: Create • Read • Update • Delete 🔁 Architecture in action: Controller → Service → In-memory data → JSON response 🧪 Tested all endpoints using Postman and verified the complete flow. ⚠️ Also understood the importance of proper error handling (next step: exception handling instead of returning null). 💻 DSA Practice: • Move zeros to end (array manipulation) • First non-repeating character (HashMap concept) ✨ This step helped me understand how real backend systems manage and manipulate data efficiently. #SpringBoot #Java #BackendDevelopment #RESTAPI #CRUD #DSA #LearningInPublic #SoftwareEngineering
To view or add a comment, sign in
-
If your API waits for everything to finish… you are slowing down your users. Some operations take time: • Sending emails • Generating reports • Calling external APIs • Processing files But many developers do this synchronously. ⸻ ❌ Blocking API @PostMapping("/register") public String registerUser() { userService.saveUser(); emailService.sendWelcomeEmail(); return "User Created"; } User waits until email is sent. Slow response. ⸻ ✅ Async Processing Return response immediately: @PostMapping("/register") public String registerUser() { userService.saveUser(); emailService.sendWelcomeEmailAsync(); return "User Created"; } ⸻ ⚙️ Spring Boot Example Enable async: @EnableAsync @SpringBootApplication Async method: @Async public void sendWelcomeEmailAsync() { // send email } ⸻ 🧠 What Happens Now User Request ↓ Save User ↓ Return Response ↓ Async Email Processing Faster APIs. ⸻ ⚠️ When to Use Async Use for: • Emails • Notifications • Background jobs • Logging Avoid for: • Transactions • Payment processing • Critical operations ⸻ 💡 Lesson Fast APIs don’t do everything. They delegate work to background processing. ⸻ Day 20 of becoming production-ready with Spring Boot. Question: Do you use async processing in your APIs? #Java #SpringBoot #BackendEngineering #Performance #Async
To view or add a comment, sign in
-
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development