🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: API Design: questions with answers

15 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. Which HTTP method is NOT idempotent by default?
  2. Q2. A logged-in student tries to open an admin-only page. Which status code fits best?
  3. Q3. What does this print? (code)
  4. Q4. Why is cursor pagination better than offset pagination for an infinite-scroll feed?
  5. Q5. The payment request succeeded but the response was lost, and the app retries with the same idempotency key. What should the server do?
  6. Q6. Which change can be made without a new API version?
  7. Q7. What does this print? (code)
  8. Q8. Which URL follows REST naming conventions?
  9. Q9. A server returns 200 OK with the body {"error": "payment failed"}. What is the main problem?
  10. Q10. Which response header tells a rate-limited client when to try again?
  11. Q11. Which HTTP method is both safe and idempotent?
  12. Q12. A student tries to book seat B7, which is already booked. Which status code fits best?
  13. Q13. What does this print? (code)
  14. Q14. Why does a retry make sense for a 503 response but not for a 400 response?
  15. Q15. The mobile app reads a field called "name". The team wants to rename it to "fullname". What is the safe approach?