Bird
0
0

Identify the error in this query: /products?fields=name;price&sort=price

medium📝 Debug Q6 of 15
Rest API - Query Parameters and Filtering
Identify the error in this query: /products?fields=name;price&sort=price
ASort cannot be used with fields parameter.
BUsing semicolon instead of comma to separate fields.
CMissing filter parameter causes error.
DFields parameter should be 'select' not 'fields'.
Step-by-Step Solution
Solution:
  1. Step 1: Check fields parameter syntax

    Fields should be comma-separated, not semicolon-separated.
  2. Step 2: Verify other parameters

    Sort and fields can be combined; no filter needed.
  3. Final Answer:

    Using semicolon instead of comma to separate fields. -> Option B
  4. Quick Check:

    Fields separator must be comma [OK]
Quick Trick: Separate fields with commas, not semicolons [OK]
Common Mistakes:
  • Using semicolons instead of commas
  • Thinking filter is mandatory
  • Believing sort and fields conflict

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes