POSTMAN
Test and debug RESTful APIs efficiently using Postman’s powerful
features like collections and environments.
Postman – API Testing and Collaboration Tool
Postman is a collaboration platform for API development and testing. It allows users to send HTTP requests, inspect responses, automate workflows, and document APIs.
- Go to https://www.postman.com/downloads/
- Download for your operating system: Windows, macOS, Linux
- Install and sign in (optional but recommended for saving workspaces)
- Open Postman → Click + New Tab
- Choose method: GET, POST, PUT, DELETE, etc.
-
Enter the API endpoint (e.g.,
https://api.example.com/users) - Click Send to execute the request and view the response
Postman supports all common HTTP methods:
- GET: Retrieve data
- POST: Send data to create new records
- PUT: Update existing data
- DELETE: Remove data
- PATCH: Partially update data
Customize requests with headers and parameters:
- Headers: Add metadata (e.g., Content-Type: application/json)
-
Query Params: Add filters or dynamic data (e.g.,
?userId=1)
Used to send data in POST, PUT, or PATCH requests.
{
"name": "John",
"email": "john@example.com"
}
Select Body → raw → JSON for JSON input.
- Postman displays response body, status code, time, and size
- Click Body, Headers, or Cookies to inspect details
- Supports viewing as JSON, HTML, text, etc.
Collections group related requests together.
- Click Save → Choose a collection or create a new one
- Organize your API testing flows (e.g., User APIs, Product APIs)
Postman supports various authentication schemes:
- Bearer Token: Add under Authorization → Bearer Token
- Basic Auth: Use username/password
- OAuth 2.0, API Key, and others are also supported
Import APIs from files, links, or OpenAPI/Swagger definitions:
- Click Import → Choose file or URL
- Supports formats like .postman_collection.json, .yaml, .har, etc.
Postman Environments, Scripting, and Automation
Variables help reuse values across requests and environments (e.g., API URLs, tokens).
- Click the Environment dropdown → Manage Environments
-
Set key-value pairs (e.g.,
base_url = https://api.example.com) - Use in requests:
{{base_url}}/users
Runs JavaScript code before a request is sent (e.g., generate tokens, time-stamps).
// Example: Add timestamp header
pm.environment.set("timestamp", Date.now());
Run JavaScript after request is sent to validate the response.
pm.test("Status code is 200", function () {
pm.response.to.have.status(200);
});
Postman Console helps debug pre-request and test scripts.
-
Open via View → Show Postman Console or
Ctrl + Alt + C - Use
console.log()in scripts to output values
Execute a full collection of requests for automated testing.
- Click Runner → Choose collection → Click Run
- Run with data (CSV/JSON) for testing multiple inputs
Run the same request multiple times with data from a file.
- Runner → Select data file (CSV or JSON)
-
Use
{{variable}}inside requests to access values from file
Simulate API endpoints when backend isn’t ready.
- Create → Mock Server → Define expected responses
- Use mock URLs in frontend development or testing
Postman Monitors automatically run requests at scheduled intervals.
- Click Monitor on a collection
- Set frequency, regions, and email alerts for failures
Collaborate with your team by sharing collections.
- Click Share → Choose link or workspace
- You can also export as JSON and import in another system
Postman supports version control via Git using the Postman API or exporting collections.
- Export collections as JSON
- Use Git to track changes to API workflows in a repository
Postman Collaboration and Advanced Features
Workspaces let teams collaborate on shared APIs, collections, and environments.
- Types: Personal, Team, Public
- Create via Workspace → Create Workspace
- Invite collaborators by email
Use HTML + JavaScript to render API response data visually inside Postman.
const template = `
Name
Email
{{#each response}}
{{name}}
{{email}}
{{/each}}
`;
pm.visualizer.set(template, { response: pm.response.json() });
Manage your API’s full lifecycle inside Postman using OpenAPI/Swagger schema.
- Click on APIs tab → Create new API definition
- Add documentation, test cases, monitors, versioning
Newman is Postman’s command-line runner for automating collection runs.
- Install via NPM:
npm install -g newman - Run:
newman run collection.json - Use in CI/CD pipelines like GitHub Actions, Jenkins, etc.
Public API endpoints for learning and testing Postman features.
- Example:
https://postman-echo.com/get - Try out headers, params, body, and scripts using this API
Generate sample code for sending requests in different languages.
- Click Code (top-right of request tab)
- Choose language: cURL, Python, Java, Node.js, Go, etc.
- Copy and paste code into your app or terminal
Keeps track of every request sent (including temporary unsaved ones).
- Located on the left sidebar
- Right-click → Save to Collection or re-run
All saved requests, environments, and collections are backed up to the cloud if signed in.
- Enables access across multiple devices
- Auto-sync ensures your changes are never lost
In Team workspaces, manage access to collections and environments.
- Roles: Viewer, Editor, Admin
- Configure access under workspace settings
Postman can be integrated with tools like Slack, GitHub, Jenkins, and more.
- Click your avatar → Integrations
- Connect to external services to automate flows or receive alerts
Postman Reference Links
Main site for downloads, features, and product updates.
Comprehensive documentation and learning guides for beginners to advanced users.
Details on how to programmatically use Postman’s own API (manage workspaces, collections, etc.).
Watch webinars, tutorials, and feature releases.
https://www.youtube.com/c/Postman
Guide to running Postman collections from the command line using Newman.
https://www.npmjs.com/package/newman
Read about use cases, tutorials, and industry trends.
Explore and fork thousands of collections shared by the community and companies.
https://www.postman.com/explore
Source code for open-source Postman tools like Newman.