Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi, I am trying to get data from a rest API which sends the cusor information for the next page. I am geeting the same cursor back as It keeps on triggering the initial condition in List. Gernate
My code
let
FnGetOnePage = (cursor_ as text) => Json.Document(Web.Contents(URLEndPoint,[
Headers = [#"Content-Type"="application/json", #"Authorization"=token],
Content = Text.ToBinary("{""kind"": """ & kind & """,""limit"": """ & Number.ToText(100) & """, ""cursor"": """ & cursor_ & """}")
]))
GeneratedList = List.Generate(
()=> [res = FnGetOnePage("")],
each [res][cursor]<>null,
each [res = FnGetOnePage([res][cursor])]
)
in
x
Hi @kunal1120 ,
You may kindly refer to
List.Generate in Power Query: Tutorial with Easy Examples
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 10 | |
| 9 | |
| 7 | |
| 5 | |
| 5 |