Bird
0
0

How should multiple query parameters be correctly formatted in a REST API URL?

easy📝 Syntax Q3 of 15
Rest API - URL and Resource Design

How should multiple query parameters be correctly formatted in a REST API URL?

A/api/data?param1=value1;param2=value2
B/api/data?param1=value1&param2=value2
C/api/data?param1=value1,param2=value2
D/api/data?param1=value1 param2=value2
Step-by-Step Solution
Solution:
  1. Step 1: Recall query parameter separator

    Multiple query parameters are separated by an ampersand (&) symbol.
  2. Step 2: Analyze options

    Only /api/data?param1=value1¶m2=value2 uses & correctly; others use incorrect separators like semicolon, comma, or space.
  3. Final Answer:

    /api/data?param1=value1¶m2=value2 -> Option B
  4. Quick Check:

    Use & to separate query parameters [OK]
Quick Trick: Use & to separate query parameters [OK]
Common Mistakes:
  • Using semicolon or comma instead of &
  • Separating parameters with spaces
  • Forgetting to use any separator

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes