InterviewStack.io LogoInterviewStack.io

RESTful API Design Questions

Focuses on designing resource oriented web APIs following Representational State Transfer principles and proper use of the Hypertext Transfer Protocol. Core skills include resource modeling and endpoint naming, use of correct Hypertext Transfer Protocol methods and semantics, status code selection and error response structure, idempotency and stateless design, request and response formats such as JavaScript Object Notation, pagination, filtering and sorting strategies, versioning and backward compatibility, authentication and authorization patterns, rate limiting and abuse prevention, caching and performance considerations, API contract testing and documentation, common anti patterns, and designing APIs that balance client usability with backend implementation concerns.

EasyTechnical
57 practiced
List and contrast common authentication choices for REST APIs: API keys, JWTs, OAuth2 (client credentials, authorization code). For a public API consumed by third-party developers that needs delegated access to user resources, which would you choose and why?
EasyTechnical
103 practiced
Explain idempotency in the context of REST APIs. Describe a simple approach to make resource-creation endpoints idempotent (e.g., payment or order creation) and outline how you'd store and validate idempotency keys in a PostgreSQL-backed service.
HardTechnical
62 practiced
Propose a testing strategy for API contract validation using OpenAPI. Include unit-level contract tests, consumer-driven contract tests, and CI/CD integration. Explain how you would verify backward compatibility and detect breaking changes before deployment.
MediumSystem Design
108 practiced
Design a REST API for uploading and downloading large files in a web application. Requirements: support resumable uploads, protect uploads with per-user authorization, offload storage to S3-compatible object storage, and minimize server bandwidth. Outline endpoints, presigned URL flow, security considerations, and how you'd handle virus scanning and content type validation.
EasyTechnical
69 practiced
Compare JSON and other response formats (XML, Protocol Buffers) for REST APIs. Discuss pros/cons in terms of client compatibility, speed, schema evolution, and debugging. When would you choose content negotiation, and how would you implement it in a backend service?

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.