Bird
0
0

Which of the following is the correct way to add a search parameter named name with value alice to a REST API URL?

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

Which of the following is the correct way to add a search parameter named name with value alice to a REST API URL?

https://api.example.com/users
Ahttps://api.example.com/users#name=alice
Bhttps://api.example.com/users/name=alice
Chttps://api.example.com/users?name=alice
Dhttps://api.example.com/users&name=alice
Step-by-Step Solution
Solution:
  1. Step 1: Recall the syntax for search parameters

    Search parameters start with a question mark (?) after the base URL.
  2. Step 2: Check the correct separator and format

    The parameter is added as ?name=alice. Using & or # or slashes is incorrect here.
  3. Final Answer:

    https://api.example.com/users?name=alice -> Option C
  4. Quick Check:

    Use ? before first parameter [OK]
Quick Trick: First parameter starts with ? in URL [OK]
Common Mistakes:
MISTAKES
  • Using & instead of ? for first parameter
  • Using # which is for anchors, not parameters
  • Adding parameters as path segments

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes