Lesson 14 of 17
24. APIs and Idempotency

Interview questions

5 min read+10 XP

Interview questions (with the counter-questions you'll get)

Q1. What makes a good API?

They're testing: design taste.

Think about your answer first, then open it.

reveal

Q2. REST vs gRPC vs GraphQL: when would you use each?

They're testing: trade-offs.

Think about your answer first, then open it.

reveal

Q3. What does idempotent mean, and which HTTP methods are idempotent?

They're testing: precise definitions.

Think about your answer first, then open it.

reveal

Q4. How do you prevent double charges when clients retry?

They're testing: the core idempotency design.

Think about your answer first, then open it.

reveal

Q5. Offset vs cursor pagination?

They're testing: practical API design.

Think about your answer first, then open it.

reveal

Q6. How do you version an API without breaking clients?

They're testing: evolution.

Think about your answer first, then open it.

reveal

Q7. Which errors should a client retry?

They're testing: reliability judgement.

Think about your answer first, then open it.

reveal

Q8. How do you secure a webhook endpoint?

They're testing: security in practice.

Think about your answer first, then open it.

reveal

Q9. What's the difference between authentication and authorisation in an API?

They're testing: security basics.

Think about your answer first, then open it.

reveal

Q10. Design an API for a payment provider (like Stripe).

They're testing: putting the chapter together.

Think about your answer first, then open it.

reveal