REST API Design Interview Questions
Resource modelling, method and status code semantics, versioning and deprecation, pagination, error contracts, auth, and caching — design judgement rather than protocol trivia.
Showing 1–20 of 100
#1What actually makes an API RESTful?
#2What does statelessness mean in practice, and what does it rule out?
#3What is HATEOAS and why does almost nobody implement it?
#4When would you choose gRPC or GraphQL over REST?
#5What is the Richardson Maturity Model?
#6What is the difference between an API being idempotent and being safe?
#7Should an API be synchronous or asynchronous, and how do you design a long-running operation?
#8What is the difference between a public API and an internal one, in design terms?
#9What does "self-descriptive messages" mean and why does it matter?
#10How do you decide the granularity of an API — chatty versus chunky?
#11What is the backend-for-frontend pattern and when is it justified?
#12What is Hyrum's law and why does it matter for API design?
#13How should you name and structure resource URLs?
#14How do you model an action that is not a CRUD operation?
#15Should you expose database IDs in your API?
#16How do you model a many-to-many relationship in a REST API?
#17Should nested resources be addressable independently?
#18How do you handle bulk operations?
#19What is a singleton resource and when is it appropriate?
#20How should search endpoints be designed?
Showing 1–20 of 100
Ask Aria about REST API Design
Sign in to chat with Aria
All 100 REST API Design questions at a glance
- What actually makes an API RESTful?(Medium)
- What does statelessness mean in practice, and what does it rule out?(Medium)
- What is HATEOAS and why does almost nobody implement it?(Hard)
- When would you choose gRPC or GraphQL over REST?(Medium)
- What is the Richardson Maturity Model?(Medium)
- What is the difference between an API being idempotent and being safe?(Medium)
- Should an API be synchronous or asynchronous, and how do you design a long-running operation?(Medium)
- What is the difference between a public API and an internal one, in design terms?(Medium)
- What does "self-descriptive messages" mean and why does it matter?(Medium)
- How do you decide the granularity of an API — chatty versus chunky?(Hard)
- What is the backend-for-frontend pattern and when is it justified?(Hard)
- What is Hyrum's law and why does it matter for API design?(Hard)
- How should you name and structure resource URLs?(Easy)
- How do you model an action that is not a CRUD operation?(Medium)
- Should you expose database IDs in your API?(Medium)
- How do you model a many-to-many relationship in a REST API?(Medium)
- Should nested resources be addressable independently?(Medium)
- How do you handle bulk operations?(Hard)
- What is a singleton resource and when is it appropriate?(Medium)
- How should search endpoints be designed?(Hard)
- Should URLs be plural or singular?(Easy)
- How do you expose computed or derived data?(Medium)
- How do you design an API for a resource that has multiple representations?(Hard)
- What is the difference between a resource and a representation?(Medium)
- What is the difference between PUT and PATCH?(Medium)
- When should POST create a resource versus PUT?(Medium)
- What should DELETE return, and what if the resource does not exist?(Medium)
- Why is returning 200 with an error in the body a bad idea?(Medium)
- When do you use 400 versus 422?(Medium)
- What is the correct status code for a successful creation, and what else should the response include?(Easy)
- How should you use 409 Conflict?(Medium)
- What is the difference between 401 and 403, and what about 404 for authorisation?(Medium)
- How should rate limiting be communicated to clients?(Medium)
- When would you use 410 Gone rather than 404?(Medium)
- Should GET ever have a request body?(Medium)
- What are the OPTIONS and HEAD methods for?(Easy)
- Should responses be wrapped in an envelope?(Medium)
- How should you handle null versus missing fields?(Hard)
- What naming convention should JSON fields use?(Easy)
- How should dates and times be represented?(Medium)
- How should monetary amounts be represented in an API?(Medium)
- How do you support sparse fieldsets and expansion?(Hard)
- What should you do about unknown fields in a request body?(Medium)
- How should enums be designed in an API?(Medium)
- How do you handle file uploads in a REST API?(Hard)
- What is content negotiation and how much of it should you implement?(Medium)
- Should you return the full resource after an update?(Medium)
- How should you design an API to be friendly to client code generation?(Hard)
- What are the options for API versioning and which would you choose?(Medium)
- What counts as a breaking change?(Medium)
- How do you deprecate an API version responsibly?(Medium)
- Should you version the whole API or individual resources?(Hard)
- How can you evolve an API without versioning at all?(Hard)
- How do you handle a bug in an API that clients have started depending on?(Hard)
- What is the difference between backward and forward compatibility?(Medium)
- How do you test that an API change is not breaking?(Hard)
- Compare offset and cursor pagination.(Medium)
- How do you implement a cursor correctly?(Hard)
- Should a paginated response include a total count?(Medium)
- How should filtering and sorting parameters be designed?(Medium)
- Where should pagination metadata go — body or headers?(Medium)
- What is the N+1 problem in an API context and how do you avoid it?(Medium)
- How do you paginate a resource that changes frequently?(Hard)
- What page size limits should an API enforce?(Easy)
- How would you design an API for exporting a large dataset?(Hard)
- Should list endpoints return full resources or summaries?(Medium)
- What should an error response body contain?(Medium)
- How do you report multiple validation errors?(Medium)
- How much internal detail should an error expose?(Medium)
- How should an API signal that a request may be retried?(Medium)
- What is a correlation ID and how should it flow through an API?(Medium)
- How do you handle partial failure in an API that calls multiple downstream services?(Hard)
- Should error messages be localised?(Medium)
- What is the most common error handling mistake you see in APIs?(Medium)
- What are the options for API authentication and when does each fit?(Medium)
- What are the trade-offs of using JWTs for API authentication?(Hard)
- Explain the OAuth 2.0 authorization code flow with PKCE.(Hard)
- What is the difference between OAuth 2.0 and OpenID Connect?(Hard)
- How should API keys be managed?(Medium)
- What is CSRF and does a REST API need protection from it?(Medium)
- What is insecure direct object reference and how do you prevent it?(Medium)
- How do you design an API for multi-tenancy safely?(Hard)
- What is mass assignment and how do you prevent it?(Medium)
- How should an API handle sensitive data in logs and responses?(Medium)
- What is the confused deputy problem in an API context?(Hard)
- How do you handle authorization for fine-grained permissions?(Hard)
- How do you make a REST API cacheable?(Medium)
- How do ETags support both caching and concurrency control?(Hard)
- How do you prevent a slow endpoint from taking down your API?(Hard)
- When should an API use compression, and what are the caveats?(Medium)
- How do you decide what to cache and where?(Medium)
- What is a cache stampede and how do you prevent it?(Hard)
- How do you measure and monitor API performance meaningfully?(Medium)
- What is conditional request handling and why is it underused?(Hard)
- What makes API documentation genuinely good?(Medium)
- Should the OpenAPI spec be written by hand or generated?(Medium)
- How do you design an API that other teams will actually adopt?(Medium)
- What are API design guidelines and why have them?(Medium)
- How do you decide whether something should be an API endpoint or an event?(Hard)
- If you inherited a badly designed API with many consumers, how would you improve it?(Hard)