InterviewStack.io LogoInterviewStack.io

RESTful API Design and HTTP Fundamentals Questions

Understanding REST architectural principles including resource-based URLs, proper HTTP methods (GET for safe retrieval, POST for creation, PUT for updates, DELETE for deletion), appropriate status codes (200 OK, 201 Created, 400 Bad Request, 404 Not Found, 500 Internal Server Error), and stateless communication patterns. Ability to design simple API endpoints following REST conventions.

MediumTechnical
83 practiced
Design a consistent error response format for an API used by multiple front-end and mobile clients. Specify fields (HTTP status, error code, message, details, user-facing vs developer-facing info). Provide an example JSON error response for a validation failure where both 'email' and 'password' fields are invalid.
HardTechnical
109 practiced
Design a distributed, high-performance rate limiter for an API used globally. Discuss token-bucket vs leaky-bucket semantics, how to implement consistency across regions (centralized store vs local approximations), and the data structures you would use in Redis or another datastore to track usage. Also describe how to expose rate-limit headers to clients.
HardSystem Design
85 practiced
Design a secure file upload API for user avatars. Requirements: prevent malicious uploads, support large files via chunked uploads, avoid storing files on application servers, and provide URLs for direct upload to object storage. Describe steps for pre-signed URL generation, server-side validation, virus scanning, and how to handle aborted uploads.
HardSystem Design
66 practiced
You're evolving an API and must coordinate schema changes that affect both the database and public API payloads. Propose a safe migration strategy that minimizes downtime and client breakage: include database migration order, backward-compatible API layer changes, feature flags, and client rollout coordination.
MediumBehavioral
77 practiced
Behavioral: Tell me about a time when you had to design or refactor an API endpoint that multiple teams depended on. Explain the steps you took to gather requirements, communicate changes, ensure backward compatibility, write tests, and how you handled disagreements with stakeholders. Use the STAR format.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.