Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
ghostrock37
New Member

API LIMITATION : how to get all the results ?

Hello,

 

We are new to powerbi. We managed to query an API and we got the data back.

On the other hand, there is a limitation on the data in response: we are limited to 100 lines.


I think this is a common issue, however we haven't found on the forum how to create a function that would retrieve ALL data.

 

We have seen that the API returns us a hasnext set to TRUE when other results are present but not returned. In addition, the API offers the possibility to skip the n first line. How to exploit this please? Is it about making a loop?

But do you have an example for powerbi? thank you

 

Here our request:

 

let
auth_key ="Token XXX",
base_url = "https://url_of_our_api/",
extension = "api/v1/alerts/",
url = base_url &extension,
header= [#"Authorization" = auth_key,
#"Content-Type" = "application/json"],
content1= "{
""filters"": {

""alertOpen"":{
""eq"": true
},

""severity"": {
""eq"": [0,1]
}
},
""skip"": 100, // skip n first lines
""limit"": 100 //by default

}",
webdata1 = Web.Contents(url, [Headers=[#"Authorization" = auth_key,
#"Content-Type" = "application/json"],Content = Text.ToBinary(content1)]),
response1 = Json.Document(webdata1),
data = response1[data]
in
data

 

Here our result :

 Capture.PNG

 

Thank a lot !

 

 

1 REPLY 1
avatorl
Impactful Individual
Impactful Individual

You can use List.Generate() function to create a loop.

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors