Use entire result of API call as input to another API

Hello @nsateesh ,

Sure there’s a way to populate the entire response body to send as the request body for another request.

Just noticed that your query is under the category “Community showcase”. Below read will define you some checklists and it will help you to get your query clarified easily.

And coming back to your query, please try to provide as much as details you could when you need a helping hand :slight_smile:

You just need to store the entire response body as an variable to use in further. And the scope of the variable depends on your requirement. For example we are storing as an environment variable here:

  1. In the first request under “Tests” scetion, please paste the below snippet.
pm.environment.set("Response", (responseBody));

Now the environment variable “Response” is created.

  1. In your subsequent requests, where you need to pass this a “Body”,

just paste

{{Response}}.

Hope this helps !!