InterviewStack.io LogoInterviewStack.io

RESTful API Design and HTTP Fundamentals Questions

Understanding REST architectural principles including resource-based URLs, proper HTTP methods (GET for safe retrieval, POST for creation, PUT for updates, DELETE for deletion), appropriate status codes (200 OK, 201 Created, 400 Bad Request, 404 Not Found, 500 Internal Server Error), and stateless communication patterns. Ability to design simple API endpoints following REST conventions.

EasyTechnical
113 practiced
Classify the common HTTP methods GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS in terms of safety and idempotency. For each method give a short example of when it is appropriate in a REST API and explain why safety or idempotency matters for client retries and caching.
HardTechnical
61 practiced
As a backend engineering lead, design a deprecation strategy for removing a widely-used endpoint. Include plan steps such as telemetry to detect usage, feature flags, concurrent versions, documentation and migration guides, client communication channels, deprecation headers, and a rollback or safety net if critical customers are affected post-removal.
EasyTechnical
69 practiced
You are given these example endpoints: 1) GET /getUser?id=123 2) POST /user/create 3) GET /v1/get-all-books 4) /accounts/123/transactions?start=... Critique these paths and redesign them to follow RESTful resource-based URL conventions. Explain choices for pluralization, nesting, query parameters, and versioning.
MediumSystem Design
71 practiced
Design a complete set of RESTful CRUD endpoints for a Book resource. For each endpoint include the HTTP method, canonical path, expected request body schema, success status codes, and a short example of the response body. Also include endpoints for nested reviews belonging to a book and how you would handle list pagination.
EasyTechnical
74 practiced
Explain Cross Origin Resource Sharing (CORS) and browser preflight requests. Which headers must the server include to allow cross origin requests, and how does the preflight OPTIONS flow work? Discuss security considerations when enabling CORS and how to allow credentials safely.

Unlock Full Question Bank

Get access to hundreds of RESTful API Design and HTTP Fundamentals interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.