Bird
0
0

Given this API call: /products?category=books&available=true, what data will the API return?

medium📝 Predict Output Q13 of 15
Rest API - Query Parameters and Filtering
Given this API call: /products?category=books&available=true, what data will the API return?
AAll products regardless of category or availability
BOnly products in the 'books' category that are available
COnly products that are unavailable
DOnly products in the 'books' category regardless of availability
Step-by-Step Solution
Solution:
  1. Step 1: Analyze query parameters

    The URL filters products where category equals 'books' and available equals true.
  2. Step 2: Determine filtering effect

    Both conditions must be met, so only available books are returned.
  3. Final Answer:

    Only products in the 'books' category that are available -> Option B
  4. Quick Check:

    Multiple filters = AND condition [OK]
Quick Trick: Multiple filters combine with AND by default [OK]
Common Mistakes:
  • Ignoring one of the filter conditions
  • Assuming filters combine with OR
  • Confusing availability true/false

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes