Bird
0
0

Which of the following is the correct way to filter users by age 30 in a REST API URL?

easy📝 Syntax Q12 of 15
Rest API - Query Parameters and Filtering
Which of the following is the correct way to filter users by age 30 in a REST API URL?
A/users?age=30
B/users/age=30
C/users?filter=age>30
D/users/age/30
Step-by-Step Solution
Solution:
  1. Step 1: Recognize query parameter syntax

    Filtering uses query parameters after ? with key=value pairs.
  2. Step 2: Match correct syntax

    /users?age=30 correctly filters users with age 30.
  3. Final Answer:

    /users?age=30 -> Option A
  4. Quick Check:

    Query param = ?key=value [OK]
Quick Trick: Use ?field=value to filter in REST API URLs [OK]
Common Mistakes:
  • Using slashes instead of query parameters
  • Using incorrect filter syntax like > without API support
  • Missing the ? before query parameters

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes