Bird
0
0

Find the mistake in this request: /orders?sort=-

medium📝 Debug Q7 of 15
Rest API - Query Parameters and Filtering
Find the mistake in this request: /orders?sort=-
ASort parameter missing field name after '-'
BMinus sign should be after the field name
CSort parameter cannot be empty
DOrders endpoint does not support sorting
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the sort parameter value

    The value is just a minus sign with no field name, which is invalid.
  2. Step 2: Understand correct descending syntax

    The minus sign must be followed by a valid field name to indicate descending order.
  3. Final Answer:

    Sort parameter missing field name after '-' -> Option A
  4. Quick Check:

    Minus sign must precede a field name [OK]
Quick Trick: Minus sign must be followed by field name [OK]
Common Mistakes:
MISTAKES
  • Using '-' alone without field
  • Placing minus sign after field
  • Assuming empty sort means default sorting

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes