API design interview questions: REST, HTTP, GraphQL and gRPC

Resources and methods, status codes, idempotency keys, ETags, pagination, versioning, errors, rate limits, webhooks and when to pick GraphQL or gRPC.

6 quick facts

– interview-ready · 22 questions in this topic

– of 22 tried

Saved on this device. Interview-ready means you got it right on two different days. Guesses and hints count for less.

Questions

  1. Designing REST resourcesPick the fix
  2. Safe and idempotent HTTP methodsPredict
  3. Choosing HTTP status codesPick the fix
  4. Idempotency keys for POSTFill the blank
  5. ETags and conditional requestsPredict
  6. Paginating API responsesPredict
  7. Versioning an APIPick the fix
  8. Which API changes are breakingPick the fix
  1. A consistent error formatPredict
  2. Rate limiting with a token bucketPredict
  3. 429, Retry-After and rate-limit headersPick the fix
  4. When GraphQL fits and what it costsPick the fix
  5. gRPC vs RESTPick the fix
  6. Designing reliable webhooksPredict
  7. Long-running operations: 202 and pollingOrder the steps
  8. CORS: what it protects and how to configure itPick the fix
  9. JSON pitfalls: money, big ids and datesPredict
  10. PATCH: merge patch vs JSON PatchPredict
  11. Uploading large filesOrder the steps
  12. Polling, SSE and WebSocketsPick the fix
  13. Batch and bulk endpointsPredict
  14. What an API gateway doesPick the fix

Practise this topic

Flashcards · 28

Flip, then say if you knew it. Needs JavaScript; every answer is also on its question page.

Quick quiz · 22 questions

One exercise per question, checked as you go. Needs JavaScript.

Mock interview · 4 sets

Timed, out loud, then tick what you covered. Needs JavaScript.

Quick facts

Recall the answer first, then tap Show to check.

Sources: Topic outline informed by System Design Primer by Donne Martin and the Zalando RESTful API Guidelines, both licensed under CC BY 4.0. Every question and answer is written by Best Latest Apps. Credits and license