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
83 practiced
Given a blog service with posts and comments and a SQL backend, propose a resource model and set of REST endpoints for: listing posts, getting a single post, creating a post, listing comments for a post, creating a comment. Discuss when to use nested URLs (e.g., /posts/{id}/comments) versus top-level resources with filters, and how that affects authorization and pagination.
HardSystem Design
81 practiced
You must deploy a breaking database schema change and accompanying API change without downtime. Describe a zero-downtime migration plan that covers schema migration steps, API fallback behavior, feature flags, client compatibility, and how to roll back safely if things fail during deployment.
MediumSystem Design
104 practiced
Design a webhook delivery system: accept event registrations (URL, secret), deliver events with retries and exponential backoff, store delivery attempts and status, and provide a dashboard for failed deliveries. Discuss authentication of webhook endpoints, replay prevention, and how to handle long delivery queues.
HardTechnical
70 practiced
Design an observability plan for your REST APIs to diagnose production issues like increased 500 errors and latency spikes. Cover structured logging, distributed tracing context propagation, metrics (latency percentiles, error rates), sampling strategies, and alerting thresholds. Explain how these signals map to debugging an individual slow request that traverses multiple services.
MediumTechnical
65 practiced
Design a consistent JSON error response schema for your APIs used by internal and external clients. The schema should provide machine-readable error codes, human messages, optional field-level validation information, and a correlation id for tracing. Provide a JSON example and explain how clients should treat retryable vs non-retryable errors.

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.