Hello All,
I have an API that is returning me a list employees with their details. I am syncing the data from this API to an entity. The problem here is I don't know how many records does this API return. When I did the sync for the first time, it synced 100 records. I am running that timer again and again to sync the remaining data but the timer is getting stopped in 3 seconds. I am not sure why is this happening. I checked the error logs but there are no errors.
How can I sync all the data from the API to the entity? How will I know if I have fetched all the data from the API.
Thanks in advance..
Hi guys,
The issue is solved. The API itself is providing details such as page number, page size, total records, apart from the actual data. I have now found a fix to understand if the full set of records have been returned or not.
Hi Krishnnambal,
Did you checked that you have more records to sync into the entity before you ran the timer second time? It could be one of the reason that you don't have more records to sync and that's why second time timer got ended with in 3 seconds.
Thanks & Kind Regards,
Sachin
Yes, it will work. Please refer the below link to support my answer :)
https://www.outsystems.com/forums/discussion/63566/count-data-received-from-api/
Hi, I tried this out but the length property is also returning me only 100 records.
Hi Krishnambal,
Did you try hitting API separately to validate the count of records it's returning? When you do that you will get to know the total amount of records returned by the API for the particular request, then try running the timer and validate whether the previous API count and one triggered by the timer and saved in an entity are the same counts.
Regards,
Saravanan Santhanam.