Make Selenium Easy

Postman Tutorial Part 36 – Export & Import Postman Collection As a JSON – Sharing Postman Collection

We have already learnt about sharing a Postman Collection as a link. In this post we will see sharing a Postman collection as a JSON file.

A Postman Collection can be exported and imported as a JSON file. This JSON file contains all metadata of collection which helps you to import collection. This exported JSON file is useful when running with Newman in Jenkins and Command line interface.

Steps to export a Postman Collection as a JSON:-

  1. In the Postman app, select a collection in the sidebar and click the ellipsis (…) button.
  2. Select “Export” control.

A Postman collection can be imported in two versions – v1 and v2. v1 is deprecated and updated version of v2 is v2.1 which is recommended. You can read more about Difference in v1 and v2 here.

3. Select the recommended version and click on Export.

4. Select path to save file. Note the file format. It will be .json. You can modify file name.

5. Open exported JSON file in Notepad or any supported json file viewer. You will see how well API data are saved.

You can save response of API in collection as well. Follow this article to learn to save response in collection. After saving response, if you export collection, you will see details of saved response in “response” array in JSON file.

Steps to import a Postman Collection as a JSON:-

  1. Click on “Import” control in Postman toolbar.

2. Click on “Choose files” control and select the exported json file.

Since, I am importing collection in same Postman window, I will get a warning of “Collection Exists”. You can either replace or import as a copy. Make your choice . I will advise you to import as a copy to see imported collection separately in Postman.

Refer basics of API Testing here.

Refer detailed tutorial of Postman here.

More about API Testing in upcoming posts. Stay tuned.

If you have any doubt, feel free to comment below.
If you like my posts, please like, comment, share and subscribe.

Author: Amod Mahajan

My name is Amod Mahajan and I am an IT employee with 6+ years of experience in Software testing and staying in Bengaluru. My area of interest is Automation testing. I started from basics and went through so many selenium tutorials. Thanks to Mukesh Otwani as his tutorials are easy and cover basics to advance. I have habit of exploring concepts by deep diving. I used to make notes. I thought of sharing my knowledge through posts and now I am here. #KeepLearning #ShareLearning

Leave a Reply

Please wait...

Subscribe to new posts to become automation expert

Want to be notified when my new post is published? Get my posts in your inbox.

Postman Tutorial Part 36 – Export & Import Postman Collection As a JSON – Sharing Postman Collection

by Amod Mahajan time to read: 1 min
%d bloggers like this: