Bird
0
0

Which of the following is the correct way to specify descending sort direction in a REST API URL query?

easy📝 Syntax Q12 of 15
Rest API - Query Parameters and Filtering

Which of the following is the correct way to specify descending sort direction in a REST API URL query?

https://api.example.com/items?sort=price&_____
Adirection=asc
Border=asc
Csort=desc
Ddirection=desc
Step-by-Step Solution
Solution:
  1. Step 1: Identify the parameter for sort direction

    The common parameter to specify sort direction is 'direction'.
  2. Step 2: Choose the correct value for descending order

    Descending order is indicated by 'desc'. So the correct query is 'direction=desc'.
  3. Final Answer:

    direction=desc -> Option D
  4. Quick Check:

    Descending sort uses direction=desc [OK]
Quick Trick: Use direction=desc for descending sort in query [OK]
Common Mistakes:
MISTAKES
  • Using 'sort=desc' instead of 'direction=desc'
  • Mixing 'asc' and 'desc' values
  • Using 'order=asc' which is not standard here

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes