As mentioned in our previous article, postman collection is a set of requests grouped into a folder for more comfortable sharing and use. This tutorial will move a step ahead to look at how postman collection can be exported to make software developers’ work easier. The export feature helps you to export a folder and save it in your local system. You can then go ahead and share it with your team, either over a network sharing or via email in a zip file. However, it is critical to remember that postman collection is usually exported in JSON format for easier sharing.
- 1 A Step to Step Tutorial on How to Export Postman Collection
- 2 How do you Export a Postman Request as Code?
- 3 How do you Export Postman Collection to OpenAPI?
- 4 Conclusion
A Step to Step Tutorial on How to Export Postman Collection
1. Select the collection you want to export
Just navigate to the postman app in your computer, open it and scroll until you reach the collections tab. Click it and choose the collection/folder you wish to export from the sidebar.
Right on the postman collection you selected, look for the ellipsis icon and click it to unlock the drop-down menu. Scroll down the menu until you reach the export command. Hit the export command to move to the next step.
3. Choose the recommended version to export
When exporting collection in JSON format, the file can be exported in two versions; v1 and v2. You will see two or three options depending on the postman version you are using.
Collection v1 is a depreciated version, while v2.1 is recommended by the postman app, which is recommended. We can’t fail to mention that the version you select will determine how easy it will be for you to use the data exported through all the workflow stages around APIs.
You’ll need to choose collection v2.1 (recommended), as shown in the image below.
4. Select the location when you want to save the collection file/folder.
The file format will be JSON, but the name will appear as an export collection. However, you can change it to a more suitable name that will be easier to remember. Once you select the path, the file will be exported automatically to the desired location.
5. Open the exported file.
Using a notepad or any other device that can read the JSON format, you can now open the exported file and see how detailed the API data is. Once you confirm that the data is valid, you can now go ahead and share it with your development teams.
How do you Export a Postman Request as Code?
Besides exporting the entire collection, programmers can also export a request that exists in a postman collection. Since the postman app supports various formats, you can export code or script in your ideal programming language.
- Exporting a request as code starts with you opening the request and clicking on the “Code” link beneath the request URL.
- Once you do this, a new pop up window with a default cURL script selected will be displayed along with a request in the form of a cURL script. The request text will change according to the formats you chose and can be copied or saved in a local system and used as desired.
How do you Export Postman Collection to OpenAPI?
- Go to APITransform.com & click “Upload Postman Collection”
- Fill out some basic information
- Upload your Postman Collection
- Click “Convert to OpenAPI”
In this tutorial, we have a detailed guideline on how you can export postman collections to your PC for easy utilization across the software development ecosystem. We have also provided you with a sneak peek of how you can export an existing request in different formats. If you were looking for a guide to help you navigate the whole process of exporting postman collections, this piece provides an in-depth step to step guide to keep you on the loop.