Bird
Raised Fist0
Postmantesting~20 mins

Query parameters in Postman - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Query Parameter Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding Query Parameters in API Requests

Which statement best describes the role of query parameters in an HTTP GET request?

AThey specify additional data sent in the URL to filter or modify the response.
BThey are used to send data securely in the request body.
CThey define the HTTP method used for the request.
DThey are headers that control caching behavior.
Attempts:
2 left
💡 Hint

Think about how URLs can include extra information after a question mark.

❓ Predict Output
intermediate
1:30remaining
Output of a GET Request with Multiple Query Parameters

Given the following URL used in Postman for a GET request:

https://api.example.com/items?category=books&sort=price_asc

What is the expected behavior of the server?

AReturn items sorted by price descending regardless of category.
BReturn all items ignoring the query parameters.
CReturn an error because multiple query parameters are not allowed.
DReturn a list of items in the 'books' category sorted by price ascending.
Attempts:
2 left
💡 Hint

Query parameters can be combined to filter and sort data.

❓ locator
advanced
1:30remaining
Identifying Query Parameters in a Postman Request

In Postman, where do you add query parameters to an HTTP request to ensure they are sent correctly?

AIn the Params tab, entering key-value pairs.
BIn the Body tab as raw JSON.
CIn the Headers tab as custom headers.
DDirectly inside the URL without using Postman interface.
Attempts:
2 left
💡 Hint

Postman has a dedicated place for query parameters separate from body or headers.

❓ assertion
advanced
2:00remaining
Validating Query Parameter Presence in Automated Tests

Which assertion correctly verifies that the query parameter 'userId=123' is present in the request URL during a test?

Postman
const requestUrl = 'https://api.example.com/data?userId=123&active=true';
Aassert(requestUrl.indexOf('userId') === -1);
Bassert(requestUrl === 'userId=123');
Cassert(requestUrl.includes('userId=123'));
Dassert(requestUrl.startsWith('userId=123'));
Attempts:
2 left
💡 Hint

Check if the URL string contains the exact query parameter substring.

🔧 Debug
expert
2:30remaining
Debugging Missing Query Parameters in Postman Request

A tester sends a GET request in Postman to https://api.example.com/search with query parameters q=testing and page=2 added in the Params tab. However, the server receives the request URL as https://api.example.com/search without any query parameters. What is the most likely cause?

AThe request method is set to POST instead of GET, so query parameters are ignored.
BThe Params tab entries were not saved or enabled before sending the request.
CThe server does not support query parameters and strips them.
DThe URL was manually edited after adding parameters, removing them.
Attempts:
2 left
💡 Hint

Check if Postman properly appended the parameters before sending.

Practice

(1/5)
1. What symbol is used to start query parameters in a URL when making an API request in Postman?
easy
A. Question mark (?)
B. Ampersand (&)
C. Hash (#)
D. Slash (/)

Solution

  1. Step 1: Understand URL structure

    Query parameters always start after the base URL with a question mark to separate them from the path.
  2. Step 2: Identify the correct symbol

    The question mark (?) is the standard symbol to begin query parameters in URLs.
  3. Final Answer:

    Question mark (?) -> Option A
  4. Quick Check:

    Query parameters start with ? = C [OK]
Hint: Query parameters always start with ? in URLs [OK]
Common Mistakes:
  • Using & to start query parameters instead of ?
  • Confusing # (fragment) with query start
  • Starting query parameters with /
2. Which of the following is the correct way to add two query parameters named user and id with values alice and 123 respectively in Postman?
easy
A. ?user=alice&id=123
B. &user=alice&id=123
C. ?user=alice#id=123
D. ?user=alice;id=123

Solution

  1. Step 1: Start query parameters with ?

    The first query parameter must start with a question mark (?).
  2. Step 2: Separate multiple parameters with &

    Additional parameters are separated by an ampersand (&), so user=alice&id=123 is correct.
  3. Final Answer:

    ?user=alice&id=123 -> Option A
  4. Quick Check:

    First ? then & between parameters = A [OK]
Hint: Start with ? then separate params with & [OK]
Common Mistakes:
  • Starting with & instead of ?
  • Using # instead of & to separate parameters
  • Using semicolon ; instead of &
3. Given the URL https://api.example.com/data?type=fruit&color=red, what will Postman send as query parameters?
medium
A. No query parameters sent
B. type=fruit only
C. type=fruit and color=red
D. color=red only

Solution

  1. Step 1: Identify all query parameters after ?

    After the question mark, parameters are separated by &. Here, we have type=fruit and color=red.
  2. Step 2: Confirm both parameters are included

    Both parameters will be sent in the request as key-value pairs.
  3. Final Answer:

    type=fruit and color=red -> Option C
  4. Quick Check:

    Both params after ? separated by & = D [OK]
Hint: All params after ? separated by & are sent [OK]
Common Mistakes:
  • Ignoring second parameter after &
  • Thinking only first parameter is sent
  • Confusing fragment (#) with query parameters
4. You wrote the URL https://api.example.com/search?query=books&limit10 in Postman. What is wrong with this query parameter syntax?
medium
A. Extra '&' before 'limit10'
B. Missing '=' between 'limit' and '10'
C. Query parameters should start with '&' not '?'
D. Using '=' instead of ':' between key and value

Solution

  1. Step 1: Check each query parameter format

    Each parameter must be in key=value format. Here, 'limit10' lacks '='.
  2. Step 2: Identify missing '=' sign

    Correct syntax should be 'limit=10' to assign value 10 to key 'limit'.
  3. Final Answer:

    Missing '=' between 'limit' and '10' -> Option B
  4. Quick Check:

    Each param must be key=value, '=' missing = B [OK]
Hint: Check each param has key=value format [OK]
Common Mistakes:
  • Omitting '=' between key and value
  • Starting query with & instead of ?
  • Using ':' instead of '='
5. You want to filter API results in Postman to show only active users with role 'admin' and limit results to 5. Which query parameter string correctly achieves this?
hard
A. ?status=active&role=admin&limit=5&
B. ?status=active&role=admin&limit5
C. ?status=active;role=admin;limit=5
D. ?status=active&role=admin&limit=5

Solution

  1. Step 1: Use correct key=value pairs separated by &

    Each filter must be a key=value pair, separated by &. ?status=active&role=admin&limit=5 uses correct syntax.
  2. Step 2: Avoid syntax errors like missing '=' or wrong separators

    ?status=active&role=admin&limit5 misses '=' in limit, C uses semicolons instead of &, D has extra trailing & which is invalid.
  3. Final Answer:

    ?status=active&role=admin&limit=5 -> Option D
  4. Quick Check:

    All params key=value separated by & = A [OK]
Hint: Use key=value pairs separated by & without extra symbols [OK]
Common Mistakes:
  • Missing '=' in parameters
  • Using semicolons instead of &
  • Adding extra & at the end
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard