05-09-2024 02:12 AM
Hi,
Has there been any progress to allow an API call to retrieve all devices rather than being restricted to 100 per page?
I have the API documentation link, however, I cannot see any reference to not using the limit. If the limit is left out of the API call is defaults to page 1 and only 10 items. If I use the max limit of 100 there are 10 pages (for example), so do I need to find a way to loop through the pages or is there a native way of retrieving all devices by one API call?
Any help appreciated.
Thanks
Solved! Go to Solution.
05-13-2024 02:23 AM
Thank Bartek,
No problem with doing it, just would make is less complicated to have a single call for all devices rather than to build something extra to get to the same result.
I did manage to do it in Power BI. For Information I used this as a guide - https://pbi-guy.com/2022/07/05/how-to-loop-through-an-api-with-power-bi-without-knowing-last-page/
05-10-2024 12:30 AM
Hi,
According to GET /devices API call there is total_pages value returned which you can use to iterate your requests. What is the problem with doing requests in a loop in this case?
05-13-2024 02:23 AM
Thank Bartek,
No problem with doing it, just would make is less complicated to have a single call for all devices rather than to build something extra to get to the same result.
I did manage to do it in Power BI. For Information I used this as a guide - https://pbi-guy.com/2022/07/05/how-to-loop-through-an-api-with-power-bi-without-knowing-last-page/