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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
paz
Regular Visitor

Web.Contents Query parameter - multiple parameters with same name

I am trying to run the following API call:
https://api.address.com/api/v1?code=xxxxxxxxxxxx&fields=CallerNumber&fields=Date&fields=NumberDialed
It runs fine in browser / postman

I want to use Web.Contents Query option, but since the API syntax requires me to precede each field with a separate "field=" clause, it gives me error:
Expression.Error: The name 'fields' is defined more than once.
Here is my PQ:
= Json.Document(Web.Contents("https://api.address.com/api/v1?code=xxxxxxxxxxxx",
[
Query= [
fields="CallerNumber",
fields="Date",
fields="NumberDialed"
]]))

I cannot use "fields=CallerNumber,Date,NumberDialed" syntax in API, only state "fields=" for each field
I tried

fields="CallerNumber&fields=Date&fields=NumberDialed" (I thought it would pass it as one string), but it didn't work

I do want to use Query option.

Any ideas?

3 REPLIES 3
evanK03
Regular Visitor

Please try using following syntax it worked for me:

fields={"FieldName1","FieldName2","FieldName3",...}

 

In your case it would be:

 

 

= Json.Document(Web.Contents("https://api.address.com/api/v1?code=xxxxxxxxxxxx",
[
Query= [
fields={"CallerNumber","Date","NumberDialed"}
]]))

 

 

v-xiaotang
Community Support
Community Support

HI  @paz 

Please check if this link help,

Solved: Web.Contents with complex Query parameter names - Microsoft Power BI Community

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

 

I did. I've checked like 30 google pages before opening this post, indluding the link you've sent.

I am asking for a specific case, which is not addressed there.

Can you help?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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