Bird
0
0

What is wrong with this query: /users?fields=name,email&filter=age>30?

medium📝 Debug Q7 of 15
Rest API - Query Parameters and Filtering
What is wrong with this query: /users?fields=name,email&filter=age>30?
AFields should include 'age' to filter by it.
BFields parameter cannot be combined with filter.
CMissing sort parameter causes failure.
DThe filter syntax is incorrect; '>' should be URL encoded.
Step-by-Step Solution
Solution:
  1. Step 1: Check filter syntax

    Special characters like '>' must be URL encoded as '%3E'.
  2. Step 2: Validate other parameters

    Fields and filter can be combined; sort is optional.
  3. Final Answer:

    The filter syntax is incorrect; '>' should be URL encoded. -> Option D
  4. Quick Check:

    Special chars in filters need encoding [OK]
Quick Trick: Encode special characters in query filters [OK]
Common Mistakes:
  • Ignoring URL encoding for special chars
  • Thinking fields and filter can't combine
  • Assuming sort is required

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes