REST API Design Interview Questions and Answers
Resource modelling, HTTP semantics, versioning and API evolution.
Whether you are preparing for entry-level REST API Design interview questions for freshers or senior software engineer interview questions addressing concurrency, scalability, and system architecture, this track provides peer-reviewed model answers with syntax walkthroughs, edge cases, and practical interview tips.
1 When is REST the wrong choice, and what would you use instead? Hard
REST excels at resource-oriented CRUD with cacheable, uniform interfaces and a broad tool ecosystem. It becomes awkward when:
- The domain is action-oriented or RPC-like, such as "recalculate rating" or complex algorithms where resource nouns feel forced.
- Clients need many different projections and REST forces over-fetching or many round trips; GraphQL lets the client shape the response.
- You need low-latency, strongly typed, bi-directional streaming between internal services; gRPC with HTTP/2 and protobuf is a better fit.
- You need real-time push; WebSockets or server-sent events are required since REST is request-response.
- You must perform large batches or long-running jobs synchronously.
The alternative is not always all-or-nothing. Many systems expose a REST or GraphQL edge to clients and use gRPC or messaging internally. Choose based on consumers, latency, payload shape and how naturally the domain maps to resources.
2 How do you model a long-running operation in REST? Hard
Do not hold the connection open. Instead accept the work and return 202 Accepted with a pointer to a status resource.
POST /reports
Location: /reports/jobs/789
Retry-After: 5
HTTP/1.1 202 Accepted
{ "id": "789", "status": "running", "progress": 0.4 }
The client polls the job URL, or you notify it via a webhook or server-sent events. When finished, the status resource either includes the result or links to it, and the job may transition to succeeded or failed with error details. Store jobs durably so a server restart does not lose them, and let polling use conditional requests and Retry-After to reduce load.
Design for idempotency: a retried POST should return the same job rather than starting a second one. Also give jobs a retention policy so the status store does not grow without bound, and consider cancellation endpoints for user-initiated work.
Frequently Asked Questions About REST API Design Interviews
What do hiring managers evaluate in REST API Design technical rounds?
Technical interviewers look for foundational fluency, idiomatic syntax, clarity when communicating complex logic, and awareness of performance trade-offs (e.g. memory footprint, render performance, and network latency) in production environments.
What are the best interview tips for practicing REST API Design questions?
Use active recall: summarize each answer in your own words before revealing the model solution. Focus on explaining why a certain approach is chosen rather than just memorizing code syntax.