Bird
0
0

Why do some REST APIs use suffixes like _lt, _gt, _lte, and _gte in query parameters?

hard📝 Conceptual Q10 of 15
Rest API - URL and Resource Design

Why do some REST APIs use suffixes like _lt, _gt, _lte, and _gte in query parameters?

ATo indicate sorting order of results
BTo specify comparison operators for filtering data
CTo define pagination limits
DTo encrypt query parameter values
Step-by-Step Solution
Solution:
  1. Step 1: Understand the meaning of suffixes _lt, _gt, _lte, _gte

    These suffixes stand for less than, greater than, less than or equal, and greater than or equal, used for filtering.
  2. Step 2: Differentiate from sorting, pagination, or encryption

    They do not control sorting, pagination, or encryption but specify comparison filters.
  3. Final Answer:

    To specify comparison operators for filtering data -> Option B
  4. Quick Check:

    Suffixes define comparison filters [OK]
Quick Trick: Suffixes like _lt mean comparison filters [OK]
Common Mistakes:
  • Confusing suffixes with sorting or pagination
  • Thinking they encrypt data
  • Assuming they are part of URL path

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes