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.

EasyTechnical
68 practiced

For each of GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS, state whether it is safe, whether it is idempotent, and whether it is cacheable, then give a short example endpoint where using the wrong method caused a real bug (for instance, a client retry duplicating a purchase, or a caching layer serving a stale response for a method it should not have cached).

EasyTechnical
80 practiced

You are designing the error handling for an API. Pick the single most appropriate HTTP status code, and briefly justify it, for each of: malformed JSON in the request body, a validation error on a business rule, an authentication failure, an authorization failure, a request for a resource that does not exist, a request accepted for asynchronous processing, and a successful resource creation versus a successful update with no content to return. Name one common mistake engineers make on at least two of these.

That is every published RESTful API Design question for QA Engineer so far. Browse the other topics in this category, or practice this one interactively.