Can we use response of an REST API(GET Method) to call another API of same application?

GD11
Tera Expert

we are triggering REST outbound GET call to another system and we are getting response with limited fields so we want to use one of the field from that response do another GET to same application which will give us more fields.

 

4 REPLIES 4

palanikumar
Giga Sage
Giga Sage

Hi,

How are you calling the rest API?

If you are using Rest Message module, then create a HTTP method with endpoint as variable (eg ${URL})

while calling this rest you can replace the variable with the URL received from payload as below

r.setStringParameterNoEscape('URL', url);
Thank you,
Palani

@palanikumar  Yes, right now I am using REST message but I might use flow designer as well or scheduled job, is there any way there too?

I can configure 2nd rest message as URL but how do I pass the response from 1st call as URL? I will get it as JSON or XML? please advise.

What are you doing in your scheduled job or flow designer? are you processing the data using import set / transform map

Thank you,
Palani

GD11
Tera Expert

@palanikumar  yes, we have to, there is going to lot of data  in the response and we will be using response to create/update the records in target table using import set or transform map/data source.