Forum Academy Marketplace Showcase Pricing Features

Make one API call based on data from another API call same page

I’m taking input from a user to make an API call to populate an RG. I then want to use the results from that API call to make a call to another API, using those results as a variable, and displaying results from that API call in an adjacent RG.

The first API call populates 10 cells. I want to gather the data from each of those 10 cells to use in the Header body (JSON). I’ve attached a screenshot and this is what I envision the body of my request looking like (the API can take multiple “targets”):

[
{
“targets”:[
“textfromcell1”,
“textfromcell2”,
“textfromcell3”,

]
}
]

This is all happening on one page, via a multistep workflow. Any thoughts? Do I need to store the results from the first API call somewhere then use them in the second API call?

Thanks for the help.