Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
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?
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"}
]]))
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?
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
92 | |
82 | |
71 | |
49 |
User | Count |
---|---|
143 | |
121 | |
111 | |
59 | |
57 |