01-23-2024 04:49 AM
I am new to snaplogic and I have an exercise where I need to retrieve data from randomuser.me/api/. I have to filter the data based on age and a few more things. Can someone tell me the basics and what can I use to filter the data? So far I get the data with the snap "REST Get" but I haven't found how to filter it. It seems like I have to retrieve this data 100 times because with every request the data will be different.
Solved! Go to Solution.
01-24-2024 11:11 AM
@TheDev - I just did a quick search on the API you list above and it appears you can get multiple results in a single call:
https://randomuser.me/api/?results=100
I recommend you use a JSON Splitter to pull individual records out of the returned results array, then a Filter snap to reduce the data to your desired results. If you want to transform the records from there, use the Mapper snap.
If you are looking for a way to kick start into SnapLogic, register for an upcoming training workshop!
Hope this helps!
01-24-2024 11:11 AM
@TheDev - I just did a quick search on the API you list above and it appears you can get multiple results in a single call:
https://randomuser.me/api/?results=100
I recommend you use a JSON Splitter to pull individual records out of the returned results array, then a Filter snap to reduce the data to your desired results. If you want to transform the records from there, use the Mapper snap.
If you are looking for a way to kick start into SnapLogic, register for an upcoming training workshop!
Hope this helps!
01-26-2024 03:50 PM
Thank you, I solved it before the reply and I came to say it's done. I didn't know much about APIs and now I understand that I should've gone through the documentation first to understand how I can handle the data. I solved it by adding a query parameter like in the picture.
Also, thank you for suggesting the training workshop. Have a good weekend!