cancel
Showing results for 
Search instead for 
Did you mean: 

API Limit Getting Devices

API Limit Getting Devices

dant
New Contributor

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

1 ACCEPTED SOLUTION

dant
New Contributor

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/

View solution in original post

2 REPLIES 2

Bartek
Contributor

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?

dant
New Contributor

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/

GTM-P2G8KFN