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.
#ThanksForReading
#HappyApiTesting

Author: Amod Mahajan

A software Tester who is paid to judge products developed by others. Currently getting paid in American Dollars. Writing technical posts and creating YouTube videos are my hobbies.

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
0
%d bloggers like this: