I have different API´s that contain the information that I need to store into my company db. To load this data we need to use api-keys for different locations that allow access to the data.
I want to automate the process of pulling out the data from the “fourvenues” api and deliver that data to the DB. For example, I have one file with different api-keys that were provided by one API (“fourvenues”) and I want to run some loop in order to take every time one api-key and the data that belong to this key, send this data into my DB and come back for the next key.
Is it possible to provide me information if I can achieve this task or redirect me to some support team who can? Ton of thanks
hello, thank you for your response. Could you please explain to me the following:
In “Edit Fields” node (SET) we have JSON and Manual mapping also, I put all api keys into json mode like this:
{
“key1”: “value1”,
“key2”: “value2”,
“key3”: “value3”,
“key4”: “value4”,
“key5”: “value5”,
“key6”: “value6”
}
in output i see all my api-keys in an array. how can i manage all of those values in order to pass them into HTTP request?
The one you sent is a json Object and not an array
The one I sent if if you want to use manual mode, add the field name as ‘API_keys’ for example, set the type to ‘Array’, and the value to this with your actual API keys
You can see that it says ‘1 item’ at the top there (In the output), so right after the SET node, add a Split Node so it splits your API keys, then use the loop node to process them one by one
I gathered data from all api-keys and now I need to push this data into aws s3 bucket, but I couldn´t understand how to do that correctly, because I sent data and saw an empty file in my s3 bucket instead of seeing all items that I have got from previous nodes
Are you trying to put those flyers in your S3 bucket?
If so, seems that you need to Use the HTTP GET node for each of those items, download them to binary, then upload that to your S3 Bucket
In my case the last SPLIT node gathered all data from different API keys, after that node I am trying to push data into AWS S3, and connections successful but it pushes empty file
Do you get all the Binary files to the last Split Out node?
If not, consider moving the S3 node inside the loop and add the files there for each item before downloading the next item’s flyers
Yes, I received all the data in the last SPLIT node(as shown in the screenshot above), but as an array of objects, not as binary files. The final delivery occurs from the last node as a single JSON file; however, it’s empty.
I can see this file in my AWS S3, which indicates that the connection was successful.
The HTTP Request1 node takes the first api-key from the list and gets data from third party api. This data represents an array of objects. How can i bring this data to binary files?
It seems to me that if I place the S3 node inside the loop, I will send data into a single S3 folder. However, each iteration provides a new API key that is responsible for a different location.
I would prefer to push data into different folders as they corespond to locations.
In that case, you might be able to use a Switch Node if you can filter based on the info from the HTTP node and have different S3 nodes based on the route.
if you only have a few folder ofc, otherwise, this might not be the most efficient way for you