Bird
Raised Fist0

An API call GET /records?offset=100&limit=20 returns an empty list. What is the most likely cause?

medium📝 Debug Q7 of Q15
Rest API - Pagination Patterns
An API call GET /records?offset=100&limit=20 returns an empty list. What is the most likely cause?
ALimit is too large
BOffset and limit parameters are swapped
COffset is beyond the total number of records
DAPI does not support pagination
Step-by-Step Solution
Solution:
  1. Step 1: Understand what empty list means in pagination

    Empty list means no data available starting at offset 100.
  2. Step 2: Reason about offset and total records

    If offset is beyond total records, no items will be returned.
  3. Final Answer:

    Offset is beyond the total number of records -> Option C
  4. Quick Check:

    Empty result means offset too large [OK]
Quick Trick: Empty results often mean offset too high [OK]
Common Mistakes:
MISTAKES
  • Swapping offset and limit
  • Assuming limit too large causes empty
  • Ignoring pagination support

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes