Automatically save API responses in Postman

when I make a call from postman, I always save the response, can I make this automatic so that I can check every call I make from postman.

1 Like

Postman has limited access to the local file system, so this functionality isn’t supported natively.

However, if you use Newman as a Node.js application, you can incorporate file system libraries to extend its capabilities.

It’s worth considering why you need to inspect every individual call made from Postman. This is precisely what test libraries and reports are designed for. By implementing appropriate tests, you can view the results directly within the Postman GUI.

Additionally, both Newman and the Postman CLI (Cloud version) support exporting test results in various formats. These outputs can be further integrated with cloud-based testing tools such as Azure DevOps, enabling automated result storage and analysis.

Postman doesn’t have a built-in feature to automatically save every response. But you can automate this by:

  • Writing test scripts to save responses as examples using Postman’s API, or
  • Running requests with Newman (Postman’s CLI) and using scripts to save responses to files automatically.

Otherwise, you have to save responses manually after each call.

Hi @DamilolaAdegunwaMoyo

You can save every response from Postman, by turning on the “Save Response” workspace level setting. You can access this from the History sidebar.

Turning this on will only save the response as an history item.

For saved requests, you can also access the saved response from history as well.

.

However, in order to add any of these responses to the collection, you would still need to click the “Save Response” button.

I am also curios on why you would want to check each request that you’ve made from Postman. If you could share your workflow and the need for it, maybe we can come up with a better solution.

1 Like

@parth-verma-1 There are a few use cases, however my main one is that I need to do multiple consecutive requests to ensure I am doing the right thing. For example: I need to pull unfiltered account statistics, then filtered, then the opposite filter to ensure that filtered data is consistent to what I need.

Let’s say I am interrupted half way through, I can’t connect the output data to a request all the time, so I am forced to repeat the exercise all over again.

Another use case is that I pulled some data and got significantly different results one hour later. I need to ensure that I did the same request and not some other filter.

Depending on your use case, I’d recommend either a data-driven test run with associated test cases, or multiple requests to the same endpoint with relevant tests attached.

The key to effective testing is consistency: you must send the exact same request each time and validate the expected result. Sending random or variable data can lead to inconsistent outcomes, which undermines the reliability of your tests.

If you’re sending the same request structure but varying the data, a data-driven approach or a loop using setNextRequest would be appropriate. You can also parameterize your tests to allow a single script to evaluate multiple outcomes.

Ultimately, control over your test data is essential. You need to send consistent requests and clearly understand the expected responses.

As for saving responses, I’m not convinced it’s necessary—if your collection is well-crafted and includes appropriate test cases, that should provide sufficient confidence that the API is functioning as intended.