Bird
0
0

Given the URL api/products?category=books&price_lt=20, what does the query parameter price_lt=20 most likely mean?

medium📝 Predict Output Q13 of 15
Rest API - URL and Resource Design

Given the URL api/products?category=books&price_lt=20, what does the query parameter price_lt=20 most likely mean?

AReturn products with price less than 20
BReturn products with price equal to 20
CReturn products with price greater than 20
DReturn products with price not equal to 20
Step-by-Step Solution
Solution:
  1. Step 1: Interpret the query parameter name

    The suffix '_lt' usually means 'less than' in filtering.
  2. Step 2: Apply meaning to the value

    price_lt=20 means filter products priced less than 20 units.
  3. Final Answer:

    Return products with price less than 20 -> Option A
  4. Quick Check:

    _lt means less than [OK]
Quick Trick: _lt means less than, _gt means greater than [OK]
Common Mistakes:
  • Confusing _lt with equal or greater than
  • Ignoring suffix meaning in parameter names
  • Assuming price_lt filters prices equal to 20

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes