Bird
0
0

Consider this API call:

medium📝 Predict Output Q5 of 15
Rest API - Pagination Patterns

Consider this API call:
GET /api/products?cursor=abc123&limit=3
If the response returns 3 items and a new cursor, what does this indicate?

AThe cursor parameter was invalid
BThis is the last page of results
CThe limit parameter was ignored
DThere are more items after the current page to fetch
Step-by-Step Solution
Solution:
  1. Step 1: Understand limit and cursor usage

    The limit=3 means the client requested 3 items. Receiving exactly 3 items means the page is full.
  2. Step 2: Interpret presence of new cursor

    A new cursor in the response means there are more items to fetch after these 3.
  3. Final Answer:

    There are more items after the current page to fetch -> Option D
  4. Quick Check:

    New cursor + full page = more items available [OK]
Quick Trick: New cursor means more data; no cursor means last page [OK]
Common Mistakes:
  • Assuming new cursor means last page
  • Thinking limit is ignored if exact items returned
  • Confusing invalid cursor with valid new cursor

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes