Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Secure a Cursor Pagination API

MediumSecurity & Infrastructure00:00
Practice interviewer
In session
5 left
00:00

Your question is Secure a Cursor Pagination API. Take a moment with it on the right.

Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).

You need to log in / sign up to chat or submit.

Problem

Scenario

You own a paginated read API that returns lists of trips, drivers, or users to internal dashboards and mobile clients. The endpoint supports filters, sort order, page size, and a cursor token for fetching the next page. A recent review found that some clients can guess object identifiers across tenants, and the team is also worried about injection, abusive scraping, and accidental leakage of sensitive fields in responses. The API sits behind a public edge but serves both user-facing and internal use cases.

Question

How would you design this pagination API and secure it against common web vulnerabilities while keeping it usable for legitimate clients? Walk through the architecture, trust boundaries, security controls, and how you would detect and respond if the endpoint were abused or data were exposed.