Postman Quick Guide
1. API Client — What and Why?
An API client is a tool used to communicate with an API.
Instead of manually running:
curl -X GET "https://example.com/api/v1/users" \
-H "Authorization: Bearer TOKEN"You can configure the same request visually in Postman:
- HTTP method:
GET - URL:
https://example.com/api/users - Headers:
Authorization: Bearer TOKEN - Body: JSON, form data, etc.
Postman then sends the request and displays:
- HTTP status code
- Response body
- Response headers
- Response time
- Response size
Alternatives
- Bruno
- Insomnia
- cURL
- HTTPie
- Hoppscotch
- Yaak
- Advanced REST Client (ARC)
- RapidAPI Client
- JetBrains HTTP Client
- VS Code REST Client
- Thunder Client
- SoapUI
2. Export to cURL / Import from cURL
Postman can convert requests between its graphical interface and curl.
Export a Request to cURL
Open the request you want to export.
Click:
Code → cURL
Postman generates an equivalent command, for example:
curl --location 'https://dev.ticket.solidservice.link/api/v1/metadata/entities'Import a cURL Command
You can also go in the opposite direction.
Click:
Import → Raw text
Paste your cURL command:
curl --location 'https://dev.ticket.solidservice.link/api/v1/metadata/entities'Postman will automatically create a request from it.
This is particularly convenient when someone gives you a cURL command and you want to inspect or modify it using Postman’s interface.
3. Export / Import Collections as JSON
A Collection is a group of related requests.
For example:
Users API
├── GET Users
├── GET User
├── POST User
├── PUT User
└── DELETE UserCollections are useful for grouping all the requests required to work with an API.
Export a Collection
In the Postman sidebar:
Collections → Right-click your collection → Export
Choose the desired collection format.
Postman generates a .json file containing the collection.
Example:
users-api.postman_collection.jsonImport a Collection
To import an existing collection:
Import → Select the .json collection file
Postman will recreate the collection and all its requests.
4. Expected / In-Request Tests
Postman allows you to execute JavaScript after a request and automatically verify the response.
This is useful for automatically verifying that a response contains what you expect.
Tests are added in the Scripts → Post-response section.
For example:
pm.test("Status is 200", function () {
pm.response.to.have.status(200);
});You can test JSON responses as well.
For this response:
{
"id": 123,
"email": "test@example.com",
"active": true
}You could write:
const response = pm.response.json();
pm.test("User has an ID", function () {
pm.expect(response.id).to.exist;
});
pm.test("User is active", function () {
pm.expect(response.active).to.be.true;
});You can have multiple tests in the same request:
const response = pm.response.json();
pm.test("Status is 200", function () {
pm.response.to.have.status(200);
});
pm.test("Response contains an ID", function () {
pm.expect(response.id).to.exist;
});
pm.test("Email is correct", function () {
pm.expect(response.email).to.eql("test@example.com");
});Postman displays the result of each test after the request executes.