Who Is This Course For?
This course is for manual testers, freshers, and anyone who wants to learn API testing using Postman — one of the most in-demand QA skills in the industry today. No programming background needed. You will go from understanding what a REST API is, to sending HTTP requests, validating JSON responses, handling authentication, writing test assertions, and running data-driven test suites using Postman's Collection Runner.
- API (Application Programming Interface) — a contract that lets two software systems exchange data; how apps talk to each other behind the scenes
- REST (Representational State Transfer) — the most widely used architectural style for web APIs; stateless, resource-based communication
- HTTP (HyperText Transfer Protocol) — the transport protocol used by every REST API; every request and response travels over HTTP
- Client-server model — your test tool (Postman) is the client; the API server processes requests and returns responses
- Monolithic architecture — one large application that handles everything; harder to scale and test independently
- Microservices — small independent services, each with its own API; testing each service separately is faster and more targeted
- API Gateway — the front door that receives all requests and routes them to the correct microservice
GET— Read/retrieve data; no body needed; safe and idempotent — sending it 100 times changes nothingPOST— Create a new resource; requires a request body with the data to save; not idempotentPUT— Full update; replaces the entire resource with what you send; whatever you leave out gets removedPATCH— Partial update; only the fields you specify are changed; everything else stays the sameDELETE— Remove a resource; typically returns204 No Content— success with no data backHEAD— Like GET but returns only headers; used for health checks without loading actual dataOPTIONS— Returns a list of HTTP methods the server supports for a given endpoint; used in CORS preflight
200 OK— Request succeeded; result is in the body — typical forGETandPUT201 Created— New resource created successfully — typical forPOST; often includes new resource URL in Location header202 Accepted— Request accepted for processing but not yet completed (asynchronous operations)204 No Content— Success but no data returned — typical forDELETE301 Moved Permanently/302 Found— Resource has moved; client should follow the new URL
400 Bad Request— Your request has a problem: missing field, wrong format, invalid value — fix the request401 Unauthorized— Not authenticated; no token, expired token, or wrong credentials403 Forbidden— Authenticated but not permitted; you're logged in but your role doesn't allow this action404 Not Found— The resource you asked for doesn't exist; check the ID or URL500 Internal Server Error— Server-side failure; the bug is in the application code, not your request502 Bad Gateway/503 Service Unavailable— Infrastructure issues; server or upstream service is down
- Endpoint — the full URL of a specific resource:
https://api.example.com/v1/users/42 - Path parameter — a variable embedded in the URL path:
/users/{id}— identifies a specific record - Query parameter — appended after
?for filtering or searching:/products?category=books&limit=10 - Request Headers — metadata sent with every request:
Content-Type: application/json,Authorization: Bearer <token> - Request Body / Payload — the data you send to create or update (required for
POST,PUT,PATCH)
- Status line — HTTP version + code + phrase:
HTTP/1.1 201 Created - Response Headers — server metadata:
Content-Type,Cache-Control,X-Request-Id - Response Body — the data returned: JSON object, array, or empty for
204 - Response time — how fast the server responded in milliseconds; a performance validation point
- JSON Object — key-value pairs in curly braces:
{"id": 1, "name": "Bhanu", "active": true} - JSON Array — ordered list in square brackets:
["admin", "viewer", "editor"]; array of objects:[{...},{...}] - Data types —
String(in double quotes),Number(no quotes),Boolean(true/false),null, nestedObject,Array - Nested JSON — objects inside objects; the standard structure for real API responses
- Common JSON mistakes that cause
400 Bad Request— missing commas, single quotes, trailing commas, wrong brackets - JSON vs XML — JSON is lighter and easier to read; XML uses tags like HTML; most REST APIs use JSON today
- Installing Postman desktop app; signing in; Postman workspace overview
- Sending a
GETrequest — enter URL, click Send, read the response body, status, and time - Sending a
POSTrequest — select Body tab →raw→JSON→ enter payload → Send - Response panel tabs — Body (Pretty / Raw / Preview), Headers, status code, response time, size
- Saving requests to a Collection — naming, adding to a folder, adding description
- Request history and duplicating requests for reuse
- Postman Collection — a named folder of related API requests; the shareable unit of API test work
- Creating collections, adding folders per module or feature, organising by CRUD operation type
- Exporting as JSON file for sharing; importing a colleague's collection to run immediately
- Environment — a named set of key-value pairs (Dev, Staging, Production); switch in one click, no request edits needed
- Environment Variable — scoped to the selected environment:
{{base_url}},{{token}} - Collection Variable — scoped to the collection; shared across all requests within it
- Global Variable — available everywhere in Postman across all collections and environments
- Variable syntax in requests —
{{variable_name}}in URL, header value, or body - Setting variables from a response:
pm.environment.set("userId", pm.response.json().id)
- Authentication vs Authorization — Authentication = who you are; Authorization = what you are allowed to do
- API Key — a static key sent as a header:
x-api-key: abc123or as a query parameter - Bearer Token — sent in the Authorization header:
Authorization: Bearer <jwt_token> - Basic Auth — username and password encoded as Base64 in the Authorization header
- OAuth 2.0 — a flow where you get a temporary access token from an auth server and use it to call protected APIs
- JWT (JSON Web Token) — a self-contained token with three sections: Header, Payload (claims), Signature
- Storing the token in an environment variable
{{access_token}}— never hardcode tokens in requests - Login flow:
POST /login→ extract token from response body →pm.environment.set("token", ...) - Token expiry — causes
401 Unauthorized; test for this scenario specifically - Setting Auth at the collection level so all requests inherit it automatically
- Valid
GETwith existing resource ID → expect200 OK+ correct data in body - Valid
POSTwith all required fields → expect201 Created+ new resource in response - Valid
PUT/PATCHwith correct ID and body → expect200 OK+ updated data - Valid
DELETEwith existing resource ID → expect204 No Content
- Missing required field in
POSTbody → expect400 Bad Requestwith meaningful error message - Wrong data type (e.g. text where a number is expected) → expect
400 Bad Request GETwith a non-existent ID → expect404 Not Found- No token in the request header → expect
401 Unauthorized - Valid token but accessing a resource the user has no permission for → expect
403 Forbidden - Boundary values — maximum field length, minimum numeric value, empty string, zero
- Duplicate
POST— creating a resource that already exists → expect400or409 Conflict
- The Tests tab — JavaScript that Postman runs automatically after every response is received
pm.test("description", function() { ... })— structure of every Postman test casepm.response.to.have.status(201)— assert the exact status code returnedpm.response.to.have.header("Content-Type")— assert a specific header is presentpm.response.responseTime < 2000— assert response is under 2 seconds
const json = pm.response.json()— parse response body as a JavaScript objectpm.expect(json.name).to.eql("Bhanu")— assert exact field valuepm.expect(json).to.have.property("id")— assert a key exists in the responsepm.expect(json.id).to.be.a("number")— assert correct data typepm.expect(json.items).to.be.an("array").that.is.not.empty— assert non-empty array- Chaining:
.to.include,.to.not.be.null,.to.be.true,.to.be.above(0)
- Pre-request Script — JavaScript that runs BEFORE the request is sent; perfect for generating dynamic test data
- Generating unique values:
pm.environment.set("email", "user" + Date.now() + "@test.com") - Conditional token refresh — check if token exists, only call
POST /loginwhen it doesn't - Request chaining —
POST /userscreates user → extractid→ store as{{userId}}→ use inGET /users/{{userId}} - Full workflow automation: Login → extract token → create record → retrieve it → update → delete — all chained automatically
- Collection Runner — executes all requests in a collection sequentially in one automated run
- Configuring iterations — how many times the entire collection runs; delay between requests in milliseconds
- Selecting specific requests or folders to include in the run
- Results panel — per-request pass/fail summary, assertion details, response time
- Exporting run results as HTML or JSON report to share with the team
- CSV data file — each row is one test iteration; column headers become variable names in Postman
- Uploading CSV in Runner — select file, Postman automatically creates one iteration per row
- Using
{{column_name}}in URL, body, and headers — same request runs with different data each time - Example: test
POST /userswith 20 different name/email combinations from a single CSV — no code needed - JSON data file as alternative for complex nested test data structures
- Swagger / OpenAPI — the industry-standard format for documenting REST APIs; your primary source for test cases
- Reading Swagger UI — endpoints, request/response schemas, required fields, example payloads
- Importing OpenAPI spec into Postman — auto-generates a collection with all endpoints ready to test
- Deriving test cases from documentation — positive cases, negative cases, boundary values, security tests
- Collection folder structure — organise by feature: Login folder, Users folder, Products folder, Orders folder
- Happy Path folder + Error Scenarios folder within each feature — clear separation of test types
- Environment strategy — separate Dev, QA, Staging, and Production environments for safe multi-environment testing
- Regression suite — a curated collection of critical tests re-run after every release to catch regressions
- Newman — Postman's command-line runner:
newman run collection.json -e environment.json - CI/CD integration — trigger Newman automatically via Jenkins, GitHub Actions, or any pipeline after each deployment
GET vs POST — GET retrieves with no body; POST creates with a body; GET is idempotent (safe to repeat), POST is not
401 vs 403 — 401 = not authenticated (missing or invalid token); 403 = authenticated but not authorised (wrong role or permission)
PUT vs PATCH — PUT replaces the whole resource; PATCH updates only the fields you specify
What do you validate? — Status code, response body fields and types, required keys present, response time, Content-Type header
Bearer Token flow — POST /login → pm.environment.set("token", json.token) → Authorization: Bearer {{token}} on all protected requests
Data-driven testing — Upload CSV to Collection Runner; each row runs as a separate iteration; {{column}} variables pull in each row's data automatically