How to call one response to other api in postman

I’m having one response in the API - http://localhost:8082/kanchiwork/ and I want to get all these responses in other API - http://localhost:9200/kanchiwork/ in postman.

Without knowing exactly what you are trying to do, the best I can offer is to save off the pieces of the response from your first request in an environment variable then use that to feed your second request.

Thanks, yes, that is possible if we are using same urls, but am trying to pass response having different urls .

Can you send screenshots of what you are trying to do? I am having a hard time understanding what your problem is.

Are you trying to compare the responses of two separate requests?

In the screenshot (1st-Request) all the listed values, am trying to get in the 2nd request, attached screenshot (2nd-Request), am trying to pass values in different requests

In the tests section for your first request, you need to set the response array to an environment variable:

In your second request (first you need to switch your verb from PUT to POST)
You need to add this script into your pre-request script:

Set the Body of your second request simply to the variable you just set. Be sure to select raw and JSON:

Then for the test on your second request, you need to add the following script to make sure it iterates fully through the list:

You then will be able to run it through the collection runner and be able to add all of your objects into your elastic store.

Thanks for your valuable time and I got the result. Thanks once again. When I run the collection, am getting only few datas and not all the datas. Did I missed anything. I have attached the screenshot for your reference.

I have attached the console for your reference.

Thanks, it works perfectly :slight_smile: I forgot elasticsearch will display 8 datas by default and I customize the elasticsearch query to display all datas.

Thanks once again for your wonderful support. Thanks :slight_smile:

Happy to help @venkateshm2280! I’m glad we got you past your issue :slight_smile: