There is more of this guide.
Practice
8 questions- API designDesign pagination for a list endpoint that returns events in chronological order. The data grows constantly. What's your story?
- API designA customer needs to walk every object in a collection of 50 million records via your API. What's your strategy?
- API designAn API endpoint returns a list that some customers want sorted by created_at and others want by updated_at. How would you handle that?
- API designDesign a GET endpoint that returns a list of blog posts. The blog has thousands of posts, so you can't return them all at once. What parameters would you add to handle this?
- API designYou're building an endpoint that lists transactions. Should you use page numbers (page=1, page=2) or limit/offset (limit=20&offset=40)? What are the basic trade-offs?
- API designProduct wants every paginated list response to include total_count. The biggest table has 200 million rows and most lists are filtered. What are the options, their costs, and what do you ship?