Backend concept

REST APIs

Resource naming, HTTP methods, route parameters, nested resources, and readable API contracts.

Practice this concept Review missed items Back to concept map

Why this matters

Good routes make backend systems easier to use, document, test, and evolve.

How to practice

Practice choosing resource-oriented methods and paths for product requirements.

0 active misses 0 reviewed 0 games completed

Local review for this concept

No local review items for this concept yet.

Start a focused review session for REST APIs.

Learning objectives

  • Choose HTTP methods based on intent and idempotency.
  • Model resources with nouns, route parameters, and nested relationships.
  • Avoid action-heavy routes when a resource-oriented design is clearer.
  • Map common API outcomes to precise HTTP status codes.
  • Distinguish authentication, authorization, validation, and conflict responses.
  • Recognize when success responses should include a body, a location, or no content.

Common mistakes to avoid

  • Using GET for state-changing operations.
  • Putting verbs everywhere, such as POST /createUser, when POST /users is clearer.
  • Forgetting nested ownership, such as comments that belong to a post.
  • Returning 200 OK for every API response and hiding errors inside the JSON body.
  • Using 404 Not Found for authorization failures that should be 403 Forbidden.
  • Using 500 Internal Server Error for client validation mistakes.

Games for REST APIs

Start with the first game, then use local review history to revisit missed decisions.

APIs Beginner

API Route Builder

Design REST-style methods and routes for product requirements such as creating users, updating email, searching products, and nested comments.

Time
6-9 minutes
Concept
REST API route design
  • Foundations
  • REST
  • API design
  • routes
Play API Route Builder
APIs Beginner

HTTP Status Defender

Choose the correct HTTP status code for realistic backend scenarios and learn the response semantics behind each answer.

Time
5-8 minutes
Concept
HTTP status codes and response semantics
  • Foundations
  • HTTP
  • REST
  • status codes
Play HTTP Status Defender
APIs Intermediate

CORS Preflight Pilot

Guide browser API requests through CORS decisions covering origins, preflight, credentials, exposed headers, and cache safety.

Time
6-9 minutes
Concept
CORS, browser security boundaries, and preflight response design
  • Foundations
  • CORS
  • HTTP
  • browser security
Play CORS Preflight Pilot