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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
prabhat_m
Frequent Visitor

Forming API Query from a table

Hi,

 

I'm trying to generate an API query which takes multiple webids as input from table values.

 

If I directly type the query as below I get the response:

prabhat_m_0-1666388856293.png

The Query works as below, passing each webid seperately.

prabhat_m_1-1666388966929.png

 

However, If I pass the webids from a table value (Custom Invoke using Json.Document(Web.Content("https:/apiserver.com/piwebapi/streamsets/value",[Query=[webid={ Column1}]])), the URL is getting passed with only webid as whole 

 

prabhat_m_2-1666389339391.png

 

prabhat_m_3-1666389466748.png

How to make this work so that all the value from the Coloumn can be passed in the query and it considers as seperate WebIds.

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @prabhat_m ,

Please update the code as below and check if it can work or not...

Json.Document(
  Web.Content(
    "https:/apiserver.com/piwebapi/streamsets/value", 
    [Query = [webid = Text.Split([Column1], ",")]]
  )
)

Any comment or problem, please feel free to let me know.

Best Regards

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@prabhat_m , Please check if this can help you

https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-i...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank Amit.

I'm using the same to form tables where cow from the example is webid.

I am trying to pass multiple query parameter for ex: Query=[q="cow","goat","dog"] which workis in the API that I'm using if I harcode it. It makes propoer query as api?q=cow&q=goat&q=dog and goes through.

 

However if I pass "Cow","goat","dog" from a coloum in a table, it is not working and the query becomes api?q="cow","goat","dog" which is incorrect format

Anonymous
Not applicable

Hi @prabhat_m ,

Please update the code as below and check if it can work or not...

Json.Document(
  Web.Content(
    "https:/apiserver.com/piwebapi/streamsets/value", 
    [Query = [webid = Text.Split([Column1], ",")]]
  )
)

Any comment or problem, please feel free to let me know.

Best Regards

Worked like a charm!! 
Thank you!

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.

Top Solution Authors