InterviewStack.io LogoInterviewStack.io

RESTful API Design Questions

Designing resource-oriented HTTP APIs following REST constraints: resource modeling, URI structure, correct use of HTTP methods, statelessness, and HATEOAS trade-offs. Covers naming conventions, collection vs. singleton resources, filtering/sorting/pagination, and choosing appropriate status codes. The default paradigm most interview questions in this category probe.

MediumTechnical
56 practiced

Your organization wants a single standard shape for API error responses instead of every team inventing its own. Explain what the Problem Details for HTTP APIs standard (RFC 7807) specifies as required versus optional fields, and what you would add beyond the standard (for example a machine-readable error code, a correlation id, and a retryable flag) to make it genuinely useful for SDK authors and partner integrators.

HardTechnical
68 practiced

HTTP/2 and HTTP/3 change some of the assumptions REST API design grew up under: request multiplexing over one connection, header compression, and (in HTTP/3) a transport built on QUIC instead of TCP. What actually changes for a REST API's design and operations when you move from HTTP/1.1 to HTTP/2 or HTTP/3, for example does the old advice to avoid too many small requests still apply, and what should change in your load-balancing and CDN configuration?

MediumSystem Design
67 practiced

Design the REST endpoints for a Book resource that also has nested Reviews belonging to it: list, get one, create, update, and delete a book, plus list and add reviews for a book. For each endpoint give the HTTP method, the canonical path, the expected request body where relevant, and the success status code. How do you keep the response shape for the list endpoint from triggering an N+1 query when reviews are included, and how does pagination interact with the nested collection?

MediumTechnical
65 practiced

Design a JSON error response schema that both your internal teams and external clients will consume: what fields would you include (for example a machine-readable code, a human message, field-level validation detail, and a correlation id for tracing), what belongs in the client response versus only in your logs, and how would a client tell a retryable error from one it should not retry?

EasyTechnical
66 practiced

For a public partner API, an internal high-throughput service mesh, and a mobile client on unreliable networks, would you reach for REST, GraphQL, or gRPC? Compare the three on caching, client flexibility, network overhead, versioning, and developer ergonomics, and justify a different choice (or the same one) for each of the three scenarios.

Unlock Full Question Bank

Get access to all 33 RESTful API Design interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.