I need to make a number of identical queries to HTTP APIs.
I’ve used a couple of set nodes to provide IP and credentials, then linked them to the input on a http request. This shows a check with a 2 by it on execution and within the node the output has run x of 2. This is great an exactly what I want.
However, I’ve having trouble figuring out how to access the individual runs. Ideally I want to separate this data back out and identify which run it was from down the chain.
I’m trying to avoid having 10+ identical runs except for the host name and credentials. I need some sort of a ‘router’ that will take the output with that ‘run’ tag out down the line after some processing of the data.
Hopefully this description makes some sense.
Thanks in advance.
Hi @syadnom, ideally you’d make sure you are passing only a single list of items on to your subsequent node currently running more than once. This way, the node would perform it’s action for each item, but you’d see all results in a neat list that’s much easier to work with.
If your data is coming from different branches you can consider using the Merge node to create a single list out of two branches like so:
If you have more than two branches you would need more Merge nodes, but the basic approach should still work.
If your logic is more complex (and your IPs or credentials are coming out of a loop, for example because you paginate through API results) you might need a slightly more complex approach like this. Once your loop finishes, this workflow will build the aforementioned single list of items using a bit of custom code.
Hope this helps
I’m not wanting the merge the data. I’m wanting to identify those ‘runs’ in the output so I can use a single processing chain repeatedly where the input of each chain is used in the output and it’s specific to that chain.
for instance, the first set of ip and credentials is to pull data from a router’s API, which is then processed, and then needs sent back to that same router. the second run has separate ip and credentials and needs to update the second router accordingly.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.