Save request to a file in Postman
Question:
How to save request to a file in Postman? Answer:
1. Move the request into a collection
2. Select Export from the collection's context menu
Description:
Saving an API request to a file in Postman is a bit more complicated than it should be. You can not simply export a request with a single click, but you can use one of the following options:
Export using a collection
Unfortunately, it is not possible to simply export an API request as there is no save or export option on the request level. However, you can export a collection. If you want to export only specific request(s) do the following:
- Create a new collection and create a copy of the related requests in the new collection.
- Select the collection and open the context menu
- Scroll down in the menu and select the Export option
- Select Export from the popup dialog
Export using a code snippet
An alternative way to export an API request is using code snippets. Postman can convert any request to various code snippets and these snippets can be copied into a file.
- Select the request you want to export
- Click on the Code icon to open Code snippet window
- Select cURL from to output type as this is the most common format.
- Copy the code and insert it into a file using any text editor.
Reference:
Postman collections reference
Share "How to save request to a file in Postman?"
Related snippets:
Tags:
export, save, request, collection, postman, file Technical term:
Save request to a file in Postman