Postman in Action
Postman in Action
12/2024
CONTENTS
1. Introduction
What is Postman?
API Development Tool:
● A platform designed to simplify and streamline API development, testing, and collaboration.
Core Functions:
● Send requests to APIs (GET, POST, PUT, DELETE, etc.).
● Validate API responses for correctness and performance.
● Automate repetitive API tasks using collections and scripts.
● Share collections, environments, and mock servers for seamless teamwork.
Beyond Testing:
● Postman is not just for testing; it also assists in API documentation, monitoring, and publishing mock APIs.
What is Postman?
Syntax:
● Variables are written in double
curly braces: {{variable_name}}.
● Example: Replace
https://api.dev.example.com/user
s with {{baseUrl}}/users.
Variables
Variable scopes
Environments
Key Idea:
● Environments store collections of variables specific to a context (e.g., dev/staging/prod).
Types of Scripts
● Pre-request Scripts
● Post-response Scripts
Example: