What is Postman?
Postman is the world's leading API platform used by millions of developers and companies to accelerate API development. It provides tools for every stage of the API lifecycle, from design and testing to documentation and monitoring.
Key Features
Request Builder
Create and send HTTP requests (GET, POST, PUT, DELETE) with headers, parameters, and body data.
Collections
Organize related API requests into collections for better project management and sharing.
Environment Variables
Manage different environments (dev, staging, production) with variable substitution.
Automated Testing
Write JavaScript tests to validate API responses and automate testing workflows.
Documentation
Generate and publish beautiful API documentation automatically from your collections.
Mock Servers
Create mock APIs to simulate server responses during development.
Common Use Cases
- API Testing: Validate API endpoints and responses
- Development: Test APIs during development process
- Documentation: Create comprehensive API documentation
- Collaboration: Share API collections with team members
- Monitoring: Set up automated API health checks
- Integration Testing: Test API integrations and workflows
Example API Test
// Postman Test Script Example
pm.test("Status code is 200", function () {
pm.response.to.have.status(200);
});
pm.test("Response time is less than 200ms", function () {
pm.expect(pm.response.responseTime).to.be.below(200);
});
pm.test("Response has user data", function () {
var jsonData = pm.response.json();
pm.expect(jsonData).to.have.property('user');
pm.expect(jsonData.user).to.have.property('id');
pm.expect(jsonData.user).to.have.property('email');
});
// Set environment variable from response
var responseJson = pm.response.json();
pm.environment.set("user_id", responseJson.user.id);