0
0
Postmantesting~20 mins

Query parameters in Postman - Practice Problems & Coding Challenges

Choose your learning style9 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.