Forum Discussion
Rest API - Retrieve data based on a group ID from a different URL
- 6 years ago
Thanks ICIC
I have found the below code working to retrive all page data without any issues. The API restricts to bring the data upto 100 rows per call. So, I had to use query to run however the condition goes on an infinite loop like you said where the query retrieves null data even there is no data found after reaching final page. Table.Remove Rows easier but the initial query is to bring in all the data until it reaches the end then table.remove rows kicks in to remove null. This process currently takes ages where I had to wait for longer to refresh.
However, I have found that each API call retrieves two records as attached in the Json - Items and hasMore record fields. Fortunately, this hasMore contains True or False which determines whether there are more data on the next page. I am just trying different different queries to see how this can be adjusted for example : the loop will continue to run until it hits Hasmore = False field then query should stop retrieving data as I think this probably the solution. Any of your help would be massive !!
Thanks ICIC
I have found the below code working to retrive all page data without any issues. The API restricts to bring the data upto 100 rows per call. So, I had to use query to run however the condition goes on an infinite loop like you said where the query retrieves null data even there is no data found after reaching final page. Table.Remove Rows easier but the initial query is to bring in all the data until it reaches the end then table.remove rows kicks in to remove null. This process currently takes ages where I had to wait for longer to refresh.
However, I have found that each API call retrieves two records as attached in the Json - Items and hasMore record fields. Fortunately, this hasMore contains True or False which determines whether there are more data on the next page. I am just trying different different queries to see how this can be adjusted for example : the loop will continue to run until it hits Hasmore = False field then query should stop retrieving data as I think this probably the solution. Any of your help would be massive !!
Hi Sankzpower ,
Glad to hear that. Please accept your solution above so that people who may have the same question can get the solution directly.
Best Regards
Icey
- Sankzpower6 years agoHelper I
Hi Icey
Thanksfor suggesting the solution. However, it did not work as the URL does not allow you to download by putting in comma as suggested. I have found a different solution which people can refer to.
Cheers