How to Import/Export collections in Postman
Postman is a popular API testing and development tool offering a feature set for organizing and managing your API requests through collections. Collections are groups of requests that can be easily organized, shared, and executed. Importing and exporting collections in Postman is better for collaboration and efficient API development. In this article, we’ll explore the various approaches to import/export collections in Postman, step by step.
Prerequisites:
Approaches:
Table of Content
- How to Import/Export Collections Using the Postman Dashboard
- How to Import Collections Using Code Repositories.
- How to Export Collections in Postman.
1. How to Import/Export Collections Using the Postman Dashboard:
Step 1: Open Postman and navigate to the “Collections” tab.
Step 2: Click on the “Import” button.
Step 3: Choose the source type, “File”
Step 4: Now Select the your json file
Step 5: Now you can see the Imported file
2. How to Import Collections Using Code Repositories:
Step 1: In the “Collections” tab, click “Import.”
Step 2: Click on “Other source” and choose your code repository as you want.
Step 3: Now click on github logo.
Step 4: Now Choose your repository details from where you want to import (Make sure Postman authenticated with your githhub account)
Step 5: Now you can see the Import Complete.
3. How to Export Collections in Postman:
Step 1: Click on three dot button of your collection.
Step 2: Scroll down and Select Export Option
Step 3: Choose “Collecion v2.1” and Click on “Export” button
Step 4: Choose the File location where you want to save this file. then Click “Save” to export the collection.
Steps to Create an Application:
Let’s create a simple application example to understand the the import/export process. Assume we have a collection named “Test Country API” with requests using REST Countries API.
Step 1: Click on the “Collections” tab. and Click on the “New Collection” button.
Step 2: Select “Blank Collection” and Name it “Test Country API.”
Step 3: Click “Add a request” in order to add your first request.
Step 4: Add Requests to the Collection
Request 1: Get All Countries
Method:
GET
Endpoint:
https://restcountries.com/v3.1/all
Now, you have a basic application in Postman that includes requests to interact with the REST Countries API.
Contact Us