Understanding APIs and Postman - Concepts and workflow in Postman.
- Sivaranjani Subbarayan
- Apr 27
- 3 min read
If you are stepping into the world of software development, testing, or automation, you have probably heard terms like API, Postman, collections, or status codes. This blog breaks them down in a clear, practical way so you can understand what they are, why we need them, how to use it.
What is API?
An API (Application Programming interface) is a bridge that allows two software system to communicate with each other .
Think of it like a waiter in a restaurant. you (client) place an order. The waiter (API) sends it to the kitchen (server). The kitchen prepares the food and sends it back via the waiter (API).
Why do we use Postman?
Postman is a popular tool used to test API. Instead of writing code to test APIs manually, Postman provides a simple interface where you can,
send request (GET, POST, PUT and DELETE)
View response instantly
Automate tests
Debug APIs easily
Why it is Useful?
No coding is required, which make great for beginners
Speedup API testing
Supporters automation and reporting
Features in Postman:
Collection:
A Collection is a group of API requests organized together in postman. it helps to keep the work organized and reusable.
Authentication:
Most real-world APIs require secure access, and Postman has built-in support for handling auth easily. Some of the types are: API Key, Bearer Token (JWT), OAuth 2.0, Basic Auth
Pre-request Scripts:
It runs before an API request is send.
Post - request Scripts:
It runs after the API response is received. we can validate the response in the post scripts. also, we can extract data and store for future use. Test case are written in this script.
Data Driven Testing:
Postman supports data driven testing. The same API request can be run multiple times with different set of data. W can use CSV or JSON file as input. Postman loops through each data row
Collection Variables:
Collection Variables are variables available across all request in a collection. we can store the base URL, or token or any other shared values in collection variables and use it across multiple APIs to avoid repeating the same data
Environment:
An Environment in postman allows you to switch between different setups.
Chaining:
It means passing data from one request to another. Extract response data in post script, store it in a variable and use it in the next request.
Assertion:
Assertion are checks used to validate API responses. It helps to ensure the API behavior. In API testing, the following 5 mandatory validations should always be included,
1.Status Code Validation – Verify the API returns the expected status code (e.g., 200, 201, 400).
2.Response Time Validation – Ensure the API responds within an acceptable time limit.
3.Response Body Validation – Check that the response contains correct and expected data.
4.Response Structure / Schema Validation – Validate that the response format and fields are correct.
5.Header Validation – Confirm important headers like Content-Type are correct.
These validations ensure the API is not only working but also reliable, fast, and consistent.
Status Code:
when you send a request, the server responds with a status code. This tells you whether API worked or failed.
Common status codes are
200 - success
201 - created
400 - Bad request
401 - unauthorized
404 - Not found
500 - internal server Error
Newman
Newman is a command-line tool that runs Postman collections. Execute tests without opening Postman UI. It also, Run collections in CI/CD pipelines.
Reports
When you run collections (especially using Newman), you can generate reports. It helps to track test results, performance and passed and failed test cases.
Types of reports:
CLI reports (basic output)
HTML reports (detailed and visual)
JSON reports (for integration)
Bringing It All Together, When working with APIs and Postman, you typically:
Create a collection
Add requests
Use variables and environments
Add pre and post scripts
Chain requests
Validate responses using assertions
Run tests with Newman
Analyze reports
In this blog, we explored the fundamentals of APIs and how tools like Postman make API testing simple and efficient. From understanding requests and responses to using collections, scripts, and validations, you now have a clear foundation to start working with APIs. We also looked at essential practices like assertions, chaining, and automation using Newman.
With these concepts, you can begin testing APIs and its workflows. The key is to practice regularly and apply what you’ve learned.
Happy Learning!

