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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
sceccolini
Frequent Visitor

Execute REST with parameters coming from another REST

Hello,

I need to execute a REST to get some data and need to execute it with a dynamic parameter coming from another REST. I also have 1 parameter for the pagination, which is working fine.

 

I defined my REST function to support 2 parameters: 1 for pagination, and 1 for my parameter:

 

 

= (Page as number, Parameter as text) =>
let
    Source = Json.Document(Web.Contents("https://myServiceURI/"&Parameter&"&page="&Number.ToText(Page))),
....

 

 

 

Then I defined my parameters from the other REST as a query parameter.

 

Now I want the query to iterate the function for each page and parameter, but I'm stuck with the syntax to iterate the execution for each parameter. This was the query based only on pagination, where myFunction supported only the pagination argument:

 

 

let
    Source = List.Generate(()=>
[Result = try myFunction(1) otherwise null, Page=1],
each [Result]<>null,
each [Result = try myFunction([Page]+1) otherwise null, Page=[Page]+1],
each [Result]),
....

 

 

 

how can I modify the above query to execute it for each parameter?

 

Thank you!

Simone

2 REPLIES 2
sceccolini
Frequent Visitor

Hmm it's still not clear to be. I thought about creating a table with URL columns to be invoked, but I don't know the synthax in POwer Query to do that 

lbendlin
Super User
Super User

1. You need to use RelativePath and Query options  if you ever want this to work in the service

2. List.Generate comes with heavy baggage. Better to have a table with page numbers,  call your REST with those, and then combine the results.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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