Answer
Adding Query Parameters in Postman
Method 1: Using the Params Tab (Recommended)
- āEnter your base URL:
https://reqres.in/api/users - āClick the Params tab below the URL bar
- āAdd key-value pairs:
Key Value page2per_page5 - āPostman automatically appends them to the URL:
CODE
https://reqres.in/api/users?page=2&per_page=5 - āClick Send
Method 2: Type Directly in URL
You can also type query params directly in the URL:
CODE
https://reqres.in/api/users?page=2&per_page=5
Postman will parse and display them in the Params tab automatically.
Method 3: Using Environment Variables
CODE
https://reqres.in/api/users?page={{pageNumber}}
Set pageNumber as an environment variable with value 2.
Enabling/Disabling Parameters
Each param has a checkbox ā uncheck it to temporarily disable without deleting:
CODE
ā page 2
ā per_page 5 ā disabled, not sent
Example Test After Adding Params
JavaScript
pm.test("Page number is 2", function () {
const jsonData = pm.response.json();
pm.expect(jsonData.page).to.eql(2);
});
Tips
- āUse Bulk Edit mode to paste many params at once
- āQuery params with special characters are automatically URL-encoded by Postman
- āParams can be linked to collection or environment variables for dynamic testing
