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