How to export specific request to file using postman?
I want to export one specific request from a Postman extension (chromium) and send it to another developer so that they can import it. How I can do this?
Solution 1:
To do that you need to leverage the "Collections" feature of Postman. This link could help you: https://learning.getpostman.com/docs/postman/collections/creating_collections/
Here is the way to do it:
- Create a collection (within tab "Collections")
- Execute your request
- Add the request to a collection
- Share your collection as a file
Solution 2:
- Click on the "Code" button upright of the request page.
- From the opened window select cURL.
- Copy and share the generated code.
You can use this curl request to import it into Postman.
This discards variables, pre-request scripts, tests... or anything Postman-specific the request has.
Solution 3:
If you want to export it as a file just do Any Collection (...) -> Export. There you should be able to choose collection version format and it will be exported in JSN file.
Solution 4:
Thanks to the previous answers you knew how to save/download a request.
For people who are asking for a way to save/export the response you can use the arrow beside the "Send" button, click "Send and Download" to get the response in .json
Solution 5:
There is no direct option to export a single request from Postman.
You can create and export collections. Here is a link to help with that.
Regarding the single request thing, you can try a workaround. I tried with the RAW body parameters and it worked.
What you can do is,
-
In your request tab, click on the 3 dots in the top right corner of your request panel/box.
-
Select Code. This will open Generate Code Snippents window.
-
Copy the cURL code and save it in a text file. Share this with who you want to.
-
They can then import the request from the text file.