REST API Interview Questions
REST principles & statelessness, HTTP methods and status codes, idempotency, resource URI design, HATEOAS and the Richardson Maturity Model, versioning, pagination, authentication (JWT, OAuth 2.0), CORS, rate limiting, caching and OpenAPI documentation.
61 questions
Popular Searches
1. What is a REST API and what are the core principles of REST?
easyREST Fundamentals 6 mins2. What does it mean for a REST API to be stateless?
mediumREST Constraints 6 mins3. What are the main HTTP methods and how do they map to CRUD operations?
easyHTTP Methods 6 mins4. What is the difference between PUT and PATCH in a REST API?
easyHTTP Methods 5 mins5. What is idempotency and which HTTP methods are idempotent?
mediumHTTP Semantics 6 mins6. What is the difference between safe and unsafe HTTP methods?
easyHTTP Semantics 5 mins7. What do the major HTTP status code categories (2xx, 3xx, 4xx, 5xx) mean?
easyHTTP Status Codes 6 mins8. What is the difference between 401 Unauthorized and 403 Forbidden?
mediumAuthentication & Authorization 6 mins9. How should you design resource URIs and naming conventions in a REST API?
mediumAPI Design 7 mins10. What is HATEOAS and what role does it play in RESTful maturity?
hardREST Principles 7 mins11. What is the Richardson Maturity Model for REST APIs?
mediumREST Principles 6 mins12. How do you handle versioning in a REST API?
mediumAPI Design 7 mins13. How do you implement pagination, filtering, and sorting in a REST API?
mediumAPI Design 8 mins14. What is content negotiation and how does the Accept header work?
mediumHTTP Protocol 7 mins15. How do you handle errors and return meaningful error responses in a REST API?
mediumError Handling 8 mins16. What is the difference between authentication and authorization in REST APIs?
easyAPI Security 6 mins17. How does token-based authentication with JWT work in a REST API?
mediumAPI Security 7 mins18. What is OAuth 2.0 and how is it used to secure REST APIs?
hardAPI Security 8 mins19. What is CORS and how do you configure it for a REST API?
mediumSecurity 7 mins20. What is rate limiting and throttling in a REST API and why are they important?
mediumReliability 7 mins21. How do caching and the ETag / Cache-Control headers work in REST APIs?
mediumPerformance 7 mins22. What is the difference between REST and GraphQL?
mediumAPI Design 6 mins23. What is the difference between REST and SOAP?
mediumAPI Protocols 6 mins24. What is the difference between REST and gRPC?
hardAPI Protocols 7 mins25. How do you design a REST API for bulk or batch operations?
mediumAPI Design 7 mins26. What is an idempotency key and how does it prevent duplicate requests?
mediumReliability 7 mins27. How do you document a REST API with OpenAPI / Swagger?
easyDocumentation 6 mins28. How do you handle long-running operations in a REST API?
mediumAPI Design 7 mins29. How do you test a REST API (unit, integration, contract)?
mediumTesting 7 mins30. What are common REST API security and design best practices?
mediumBest Practices 7 mins31. How do you prevent lost updates in a REST API using conditional requests?
hardConcurrency & Consistency 9 mins32. Why does offset pagination degrade at scale and how does keyset pagination fix it?
hardPerformance 9 mins33. How do you set timeouts, retries and backoff correctly when calling a REST API?
hardReliability 9 mins34. How do circuit breakers and bulkheads stop one slow REST dependency taking down your service?
hardReliability 10 mins35. How do you handle over-fetching and under-fetching in a REST API without abandoning REST?
mediumAPI Design 9 mins36. How do you design reliable webhooks for a REST API, and when is polling the better choice?
hardIntegration 11 mins37. How do you enforce tenant isolation in a multi-tenant REST API?
hardSecurity 10 mins38. How do you design file upload and download in a REST API for large files?
hardAPI Design 10 mins39. How do you make a REST API observable enough to debug a production incident?
hardOperations 11 mins40. How do you keep data consistent when one REST call in a multi-service workflow fails?
hardDistributed Systems 11 mins41. How do you prevent mass assignment and other input-trust failures in a REST API?
hardSecurity 10 mins42. How do you diagnose and reduce latency in a REST API at the payload and transport layer?
hardPerformance 10 mins43. How would you design a machine-readable error format for a REST API?
mediumError Design 9 mins44. What is the difference between JSON Patch and JSON Merge Patch, and when would you use each?
hardHTTP Semantics 10 mins45. How do you handle two concurrent requests that arrive with the same idempotency key?
hardReliability 11 mins46. What should a rate-limited REST response tell the client, and how should the client react?
mediumTraffic Management 10 mins47. How do you deprecate and retire a REST API version without breaking consumers?
mediumLifecycle 10 mins48. A browser call to your API fails with a CORS error but curl works. How do you debug it?
hardBrowser & CORS 11 mins49. What belongs in an API gateway and what should stay in the service?
hardArchitecture 11 mins50. How do you build a reliable, secure webhook delivery system?
hardEvent Delivery 12 mins51. How do you cache REST API responses at a CDN without leaking data between users?
hardCaching 11 mins52. Why do most REST APIs stop short of HATEOAS, and when is it actually worth implementing?
hardAPI Design 11 mins53. Which REST API changes are breaking, and how do you evolve a contract without a new version?
mediumAPI Evolution 10 mins54. How should a bulk REST endpoint report that some items succeeded and others failed?
hardBulk Operations 10 mins55. How do HTTP/2 and HTTP/3 change how you design and operate a REST API?
hardTransport 11 mins56. How do you keep a REST service usable when demand exceeds its capacity?
hardResilience 11 mins57. How would you authenticate service-to-service REST calls, and when is mutual TLS worth it?
hardSecurity 11 mins58. How should DELETE behave when your system uses soft deletes?
mediumResource Lifecycle 10 mins59. How do you expose complex search over REST when the query no longer fits in a URL?
mediumAPI Design 10 mins60. How do you serve a very large export from a REST API without exhausting memory?
hardPerformance 11 mins61. How do you model absent, null and empty values in a REST JSON contract?
mediumAPI Design 9 mins