Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Saving API response in Postman to a file

Tags:

api

postman

How can I save API response, that I get in Postman, to a Json file or CSV file?

like image 778
Ashu Srivastava Avatar asked Oct 18 '17 14:10

Ashu Srivastava


People also ask

Can Postman write to file?

Sooner or later you will ask yourself the question: how can a read or write files to disk when using Postman? The quick answer to this question is: you cannot. From here on, starts the answer to this question and a possible solution that will require some JavaScript skills on your side.

How do I save a Postman response in Excel?

in a nutshell i want to save all request and their corresponding responses into excel sheet. you can do it using newman as a library. just store the data you want in a environment variable , and at the end of the run export that varaible and write to csv.


2 Answers

There are 2 ways of saving the response to a file:

  1. Click on the small down arrow besides the "Send" button, this will show the "Send and Download" button. Click on it and postman will ask you where to save the response, when the request is done.

send and download button

  1. There is a "Download" button in the response section of the window.

download button

like image 97
franksands Avatar answered Sep 18 '22 09:09

franksands


In Postman 7.3 simply click Save Response after executing a request.

enter image description here

like image 39
CoolMind Avatar answered Sep 17 '22 09:09

CoolMind