Module 04 · API fundamentals · Drill
API fundamentals drill
Scenario prompts that check whether api fundamentals is usable under pressure. Answer out loud, then compare.
0 of 4 graded
Prompt 1
Design the public API for a payments product used by thousands of merchants. Cover the charge endpoint end to end: shape, status codes, safety under retries, and how you will evolve it for two years without breaking anyone.
Prompt 2
A product has web, iOS and Android clients and a dozen backend services. The mobile team complains about seven round trips per screen; the backend team complains about untyped JSON between services. Propose the API layering and defend each choice.
Prompt 3
Design authentication for a SaaS API with a browser SPA, a mobile app, partner integrations acting on behalf of users, and internal service-to-service calls. State where state lives, how you revoke, and which OAuth grant each client uses.
Prompt 4
An activity feed endpoint returns 20 items per page with offset pagination and has started timing out at page 500 while users report seeing duplicate posts. Diagnose both symptoms and redesign the endpoint, including filters and a full-history export.